DATA STRUCTURE Programming and Technical Programming Technical

Which of the following data structure is best used for level by level order traversal in Binary tree?
[1] Queue
[2] Stack
[3] Array
[4] None of the above

Read Solution (Total 5)

DATA STRUCTURE Other Question

Imagine that two divisions of the Pandava army are camped outside an enemy camp of
Kauravas commanded by Bhishma. Each division is commanded by its own general;
Saatyaki and Yudhishtra. The two generals can communicate with one another only by
messengers, who might get caught by the Kauravas. After observing the Kaurava camp,
Saatyaki and Yudhistra must each decide independently whether to attack the Kauravas
or not. Then they must each communicate their plan to the other through messengers.
Upon receiving a message from the other, both Saatyaki and Yudhistra must decide a
common plan of action. The Pandavas can succeed only when both Saatyaki and
Yudhishtra attack the Kaurava camp at the same time.
Which of the following traversal is used for printing the keys of Binary search tree in ascending order?
[1]post-order traversal
[2]pre-order traversal
[3]in-order traversal
[4]None of the above