91. What does the following piece of code do?
public void func(Tree root)
{
System.out.println(root.data());
func(root.left());
func(root.right());
}
public void func(Tree root)
{
System.out.println(root.data());
func(root.left());
func(root.right());
}
92. What are the operations that could be performed in O(logn) time complexity by red-black tree?
93. In general, the node content in a threaded binary tree is . . . . . . . .
94. To restore the AVL property after inserting a element, we start at the insertion point and move towards root of that tree. is this statement true?
95. Given that 2 elements are present in the tree, write a function to find the LCA(Least Common Ancestor) of the 2 elements.
96. What will be the height of a balanced full binary tree with 8 leaves?
97. What are the worst case and average case complexities of a binary search tree?
98. What happens if we apply the below operations on an input sequence?
i. construct a cartesian tree for input sequence
ii. put the root element of above tree in a priority queue
iii. if( priority queue is not empty) then
iv. search and delete minimum value in priority queue
v. add that to output
vi. add cartesian tree children of above node to priority queue
i. construct a cartesian tree for input sequence
ii. put the root element of above tree in a priority queue
iii. if( priority queue is not empty) then
iv. search and delete minimum value in priority queue
v. add that to output
vi. add cartesian tree children of above node to priority queue
99. What is the traversal strategy used in the binary tree?
100. In postorder traversal of binary tree right subtree is traversed before visiting root.
Read More Section(Binary Search Trees(B Tree))
Each Section contains maximum 100 MCQs question on Binary Search Trees(B Tree). To get more questions visit other sections.