Vidyalelo
Data Structure · all questions

Binary Search Trees(B Tree)
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

275

Questions

6/14

Page

Pick an option on a question to see the right answer and solution.

What is a splay operation?

Select an option to see the answer and solution.

The following given tree is an example for?
Binary Search Trees(B Tree) mcq question image

Select an option to see the answer and solution.

The steps for finding post-order traversal are traverse the right subtree, traverse the left subtree or visit the current node.

Select an option to see the answer and solution.

Binary tree sort implemented using a self balancing binary search tree takes O(n log n) time in the worst case but still it is slower than merge sort.

Select an option to see the answer and solution.

What operation does the following diagram depict?
Binary Search Trees(B Tree) mcq question image

Select an option to see the answer and solution.

What is the possible number of binary trees that can be created with 3 nodes, giving the sequence N, M, L when traversed in post-order.

Select an option to see the answer and solution.

The size value of various nodes in a weight balanced tree are
leaf - zero
internal node - size of it's two children
is this true?

Select an option to see the answer and solution.

Why is heap implemented using array representations than tree(linked list) representations though both tree representations and heaps have same complexities?
for binary heap
-insert: O(log n)
-delete min: O(log n)
 
for a tree
-insert: O(log n)
-delete: O(log n)
Then why go with array representation when both are having same values ?

Select an option to see the answer and solution.

AVL trees are more balanced than Red-black trees.

Select an option to see the answer and solution.

Which algorithm is used in the top tree data structure?

Select an option to see the answer and solution.

What is the condition for priority of a node in a treap?

Select an option to see the answer and solution.

What is the longest length path for a node x in random binary search tree for the insertion process?

Select an option to see the answer and solution.

Which of the following options is an application of splay trees?

Select an option to see the answer and solution.

What is the condition for a tree to be weight balanced. where a is factor and n is a node?

Select an option to see the answer and solution.

Given an empty AVL tree, how would you construct AVL tree when a set of numbers are given without performing any rotations?

Select an option to see the answer and solution.

A binary tree is a rooted tree but not an ordered tree.

Select an option to see the answer and solution.

Select the code snippet which performs post-order traversal.

Options are not available for this question.

Select an option to see the answer and solution.

How many children does a binary tree have?

Select an option to see the answer and solution.

Cartesian trees solve range minimum query problem in constant time.

Select an option to see the answer and solution.

What does the following piece of code do?
public void func(Tree root)
{
	func(root.left());
	func(root.right());
	System.out.println(root.data());
}

Select an option to see the answer and solution.