ExamVeda
Login
Home
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());
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
92
What are the operations that could be performed in O(logn) time complexity by red-black tree?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
93
In general, the node content in a threaded binary tree is . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
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?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
95
Given that 2 elements are present in the tree, write a function to find the LCA(Least Common Ancestor) of the 2 elements.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
96
What will be the height of a balanced full binary tree with 8 leaves?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
97
What are the worst case and average case complexities of a binary search tree?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
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
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
99
What is the traversal strategy used in the binary tree?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
100
In postorder traversal of binary tree right subtree is traversed before visiting root.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board