
Data structure and Algorithms(QUIZ 2)
Authored by Ms.Syed Rufa
Other
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A Binary Tree is defined as a tree in which each node has:
At least two children
At most two children
Exactly two children
No children
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Insertion in a Binary Search Tree (BST) always places the new key:
At the root
In the leftmost leaf
According to the BST property
At the rightmost leaf
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In BST deletion, deleting a node with two children uses which replacement?
Replace with inorder successor or predecessor
Replace with parent
Replace with root
Replace with first leaf
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The height of a BST becomes greater than O(log n) when:
Keys are inserted randomly
Keys follow sorted order
Keys follow reverse order
Both B and C
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Height balance in AVL trees ensures height O(log n) because:
Every subtree has exactly two children
Balance factor is always 0
Height difference between subtrees is at most 1
Rotations occur after every insertion
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
AVL rotations restore balance by:
Rebuilding the entire tree
Adjusting structure locally around imbalance
Swapping node values
Deleting nodes
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A Red-Black Tree ensures balance using:
Heights of subtrees
Colors and structural properties
Level-order rotation
Strict height difference of 1
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?