Data Structures MCQs (Set-2)

How many children can a binary tree node have at most?

A One
B Three
C Two
D Unlimited

What is a tree's root?

A Topmost node
B Node with no children only
C Last inserted leaf
D Smallest key always

What is a leaf node?

A Node with two parents
B The root only
C Node with no children
D Node with no value

What does a node's degree count?

A Its ancestors
B Its children
C Its key bits
D Its sibling values

What order does a binary search tree use?

A Keys stored by arrival only
B All left keys larger
C Heap ordered keys
D Left keys smaller, right larger

Which traversal of a BST visits keys in sorted order?

A Preorder
B Inorder
C Postorder
D Level order

What order does preorder traversal use?

A Node, left, right
B Left, node, right
C Left, right, node
D Right, node, left

What order does postorder traversal use?

A Node, left, right
B Left, node, right
C Left, right, node
D Node, right, left

Which data structure supports level order traversal?

A Stack
B Hash set
C Queue
D Disjoint set

What does tree height measure?

A Number of leaf values
B Total number of edges only
C Maximum node degree
D Longest root to leaf path

What defines a complete binary tree?

A Every node has two children
B Every leaf has same key
C Levels full except possibly last
D Only one level exists

What defines a full binary tree?

A Every level is full
B Every node has one child
C Keys are sorted in order
D Zero or two children

What property does a balanced tree maintain?

A Height grows logarithmically
B Every key is equal
C Every leaf has zero depth
D Sorted memory values

What is an AVL balance factor?

A Left height minus right height
B Number of nodes in tree
C Parent key minus child key
D Tree height times two

What operation restores AVL balance?

A Hashing
B Linear probing
C Path compression
D Rotation

What ordering does a min heap satisfy?

A Parent no greater than children
B Left child always smaller
C All leaves sorted
D Root is largest key

What value is at a min heap root?

A Maximum value
B Most recent value
C Minimum value
D Median value always

What does extract min do?

A Removes and returns minimum
B Adds a new root
C Sorts the whole heap
D Deletes all leaves

What is heap insertion time?

A O(log n)
B O(1) always
C O(n squared)
D O(n)

In a zero based heap array, left child of i is?

A 2i
B i plus 1
C i divided by two
D 2i plus 1

What does a trie store efficiently?

A Only sorted numeric arrays
B Graph edge weights
C Heap priorities only
D Keys by shared prefixes

What is a B tree designed to support?

A Only binary recursion
B Efficient multiway search
C Constant time range scans always
D A single root value

What feature helps red black trees stay balanced?

A Random key deletion
B Coloring rules on nodes
C A fixed maximum size
D Circular array storage

What is an unbalanced BST worst case search time?

A O(1)
B O(n)
C O(log n) always
D O(n squared)

What can a tree rotation preserve?

A The exact tree shape
B Search key ordering
C Every node's depth
D Insertion order