Trees MCQs | Trees Short Questions and Answers

Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Questions
41 Suppose a binary tree is constructed with n nodes, such that each node has exactly either zero or two children. The maximum height of the tree will be?
A (n+1)/2
B (n-1)/2
C n/2 -1
D (n+1)/2 -1

Answer: (n-1)/2
42 The worst case height of an AVL tree with n nodes is ……………
A 2 lg n
B 1.39 lg n
C 1.44 lg n
D 1.64 lg n

Answer: 1.44 lg n
Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
43 An insertion into a ……………………….. is performed by inserting the new node in the location referenced by next in the array and then “sifting it up” by comparing the key of the newly inserted node with the key of the parent.
A Red-Black
B AVL
C Binary Search
D Binary Heap

Answer: Binary Heap
44 In a …………………….. for every node X with a parent P, the key in P is less than or equal to the key in X.
A Red-Black
B AVL
C Binary Search
D Binary Heap

Answer: Binary Heap
45 For an AVL tree ………………………….. is the additional piece of information which indicates if the difference in height between the left and right subtree is the same or if not, which of the two subtrees has height one unit larger.
A Tree Factor
B Balance Factor
C Additional Factor
D Unit Factor

Answer: Balance Factor
46 While inserting into ………………………….., insertions are done at a leaf and will replace an external node with an internal node with two external children.
A Red-Black Tree
B AVL Tree
C Binary Search Tree
D Binary Heap Tree

Answer: Red-Black Tree
47 Which of the following is/are properties of red-black tree. i) every node is either red or black ii) the root is red iii) If a node is red, then both its children are black iv) every leaf is black
A i, ii and iii only
B i, iii and iv only
C i, ii and iv only
D All i, ii, iii and iv

Answer: i, iii and iv only
48 A lemma is a red-black tree with n internal nodes has height at most ……………
A 2lg(n)
B 2n
C 2lg(n+1)
D n+1

Answer: 2lg(n+1)
49 …………………………… is a binary search tree whose left subtree and right subtree differ in height by at most 1 unit and whose left and right subtrees are themselves AVL trees.
A Red-Black Tree
B AVL Tree
C Binary Head Tree
D A-A Tree

Answer: AVL Tree
50 In binary search tree, a …………………… rooted to node n is the tree formed by imaging node n was a root.
A cycle
B node
C root
D subtree

Answer: subtree
51 The order with which the nodes are inserted affects the running time of the ……………………. search algorithm.
A AVL Tree
B Red-Black Tree
C Binary Search Tree
D Binary Heap Tree

Answer: Binary Heap Tree
52 In the best case of BST, the time is on the order of ……………………, but in the worst case it requires linear time.
A log₂n
B n
C log₂(n+1)
D n+1

Answer: log₂n

Random GK Questions

Assam Direct Recruitment Test Series

Teacher Eligibility Test

Assam Direct Recruitment Test Series