wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Binary Tree Quiz

Total questions: 144

Worksheet time: 1hrs 15mins

Name
Class
Date
1.

What is the maximum number of children that a binary tree node can have?

a)

0

b)

1

c)

2

d)

3

2.

The following tree is an example of?

a)

Binary tree

b)

Binary search tree

c)

Fibonacci tree

d)

None

3.

How many common operations are performed in a binary tree?

a)

1

b)

2

c)

3

d)

4

4.

What is the traversal strategy used in a binary tree?

a)

depth-first traversal

b)

breadth-first traversal

c)

random traversal

d)

priority traversal

5.

How many types of insertions are performed in a binary tree?

a)

1

b)

2

c)

3

d)

4

6.

What operation does the following diagram depict?

a)

Inserting a leaf node

b)

Inserting an internal node

c)

Deleting a node with 0 or 1 child

d)

None

7.

How many bits would a succinct binary tree occupy?

a)

n + O(n)

b)

2n + O(n)

c)

n / 2

d)

n

8.

The average depth of a binary tree is given as?

a)

O(N)

b)

O(√N)

c)

O(N2)

d)

O(log N)

9.

How many orders of traversal are applicable to a binary tree (in general)?

a)

1

b)

4

c)

2

d)

3

10.

If binary trees are represented in arrays, what formula can be used to locate a left child if the node has an index i?

a)

2i+1

b)

2i+2

c)

2i

d)

4i

11.

Using what formula can a parent node be located in an array?

a)

(i+1)/2

b)

(i-1)/2

c)

i/2

d)

2i/2

12.

Which of the following properties are obeyed by all three tree traversals?

a)

Left subtrees are visited before right subtrees

b)

Right subtrees are visited before left subtrees

c)

Root node is visited before left subtree

d)

Root node is visited before right subtree

13.

For the tree below, write the pre-order traversal.

a)

2, 7, 2, 6, 5, 11, 5, 9, 4

b)

2, 7, 5, 2, 6, 9, 5, 11, 4

c)

2, 5, 11, 6, 7, 4, 9, 5, 2

d)

none

14.

For the tree below, write the post-order traversal.

a)

2, 7, 2, 6, 5, 11, 5, 9, 4

b)

2, 7, 5, 2, 6, 9, 5, 11, 4

c)

2, 5, 11, 6, 7, 4, 9, 5, 2

d)

none

15.

What is the time complexity of pre-order traversal in the iterative fashion?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n log n)

16.

What is the space complexity of post-order traversal in a recursive fashion? (d is the tree depth and n is the number of nodes)

a)

O(1)

b)

O(nlogd)

c)

O(logd)

d)

O(d)

17.

To obtain a prefix expression, which tree traversal is used?

a)

Level-order traversal

b)

Pre-order traversal

c)

Post-order traversal

d)

In-order traversal

18.

Consider the following data. The pre-order traversal of a binary tree is A, B, E, C, D. The in-order traversal of the same binary tree is B, E, A, D, C. The level order sequence for the binary tree is

a)

A, C, D, B, E

b)

A, B, C, D, E

c)

A, B, C, E, D

d)

D, B, E, A, C

19.

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?

a)

15

b)

3

c)

5

d)

8

20.

The post-order traversal of a binary tree is O P Q R S T. Then the possible pre-order traversal will be

a)

T Q R S O P

b)

T O Q R P S

c)

T Q O P S R

d)

T Q O S P R

21.

A binary search tree contains the values 7, 8, 13, 26, 35, 40, 70, and 75. Which one of the following is a valid post-order sequence of the tree, given the pre-order sequence as 35, 13, 7, 8, 26, 70, 40, and 75?

a)

7, 8, 26, 13, 75, 40, 70, 35

b)

26, 13, 7, 8, 70, 75, 40, 35

c)

7, 8, 13, 26, 35, 40, 70, 75

d)

8, 7, 26, 13, 40, 75, 70, 35

22.

Which of the following pairs' traversals on a binary tree can build the tree uniquely?

a)

post-order and pre-order

b)

post-order and in-order

c)

post-order and level order

d)

level order and pre-order

23.

A full binary tree can be generated using

a)

post-order and pre-order traversal

b)

pre-order traversal

c)

post-order traversal

d)

in-order traversal

24.

The maximum number of nodes in a tree for which post-order and pre-order traversals may be equal is

a)

3

b)

1

c)

2

d)

any number

25.

The pre-order and in-order traversals of a binary tree are T M L N P O Q and L M N T O P Q. Which of the following is the post-order traversal of the tree?

a)

L N M O Q P T

b)

N M O P O L T

c)

L M N O P Q T

d)

O P L M N Q T

26.

Find the postorder traversal of the binary tree shown below.

a)

P Q R S T U V W X

b)

W R S Q P V T U X

c)

S W T Q X U V R P

d)

None

27.

For the tree below, write the in-order traversal.

a)

6, 2, 5, 7, 11, 2, 5, 9, 4

b)

6, 5, 2, 11, 7, 4, 9, 5, 2

c)

2, 7, 2, 6, 5, 11, 5, 9, 4

d)

none

28.

For the tree below, write the level-order traversal.

a)

2, 7, 2, 6, 5, 11, 5, 9, 4

b)

2, 7, 5, 2, 11, 9, 6, 5, 4

c)

2, 5, 11, 6, 7, 4, 9, 5, 2

d)

none

29.

What is the space complexity of the in-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes)

a)

O(1)

b)

O(n log d)

c)

O(log d)

d)

O(d)

30.

What is the time complexity of level order traversal?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n log n)

31.

Which of the following graph traversals closely imitates the level order traversal of a binary tree?

a)

Depth First Search

b)

Breadth First Search

c)

Depth & Breadth First Search

d)

Binary Search

32.

In a binary search tree, which of the following traversals would print the numbers in ascending order?

a)

Level-order traversal

b)

Pre-order traversal

c)

Post-order traversal

d)

In-order traversal

33.

The number of edges from the root to the node is called the depth of the tree.

a)

Height

b)

Depth

c)

Length

d)

Width

34.

The number of edges from the node to the deepest leaf is called the height of the tree.

a)

Height

b)

Depth

c)

Length

d)

Width

35.

What is a full binary tree?

a)

Each node has exactly zero or two children

b)

Each node has exactly two children

c)

All the leaves are at the same level

d)

Each node has exactly one or two children

36.

What is a complete binary tree?

a)

Each node has exactly zero or two children

b)

A binary tree that is completely filled, with the possible exception of the bottom level, which is filled from right to left

c)

A binary tree that is completely filled, with the possible exception of the bottom level, which is filled from left to right

d)

A tree in which all nodes have degree 2

37.

What is the average case time complexity for finding the height of a binary tree?

a)

h = O(loglogn)

b)

h = O(nlogn)

c)

h = O(n)

d)

h = O(log n)

38.

Which of the following is not an advantage of trees?

a)

Hierarchical structure

b)

Faster search

c)

Router algorithms

d)

Undo/Redo operations in a notepad

39.

In a full binary tree, if the number of internal nodes is I, then the number of leaves L is?

a)

L = 2*I

b)

L = I + 1

c)

L = I - 1

d)

L = 2*I - 1

40.

In a full binary tree, if the number of internal nodes is I, then the number of nodes N is?

a)

N = 2*I

b)

N = I + 1

c)

N = I - 1

d)

N = 2*I + 1

41.

In a full binary tree, if there are L leaves, then the total number of nodes N is?

a)

N = 2*L

b)

N = L + 1

c)

N = L - 1

d)

N

42.

In a full binary tree, if there are L leaves, then the total number of nodes N is?

a)

N = 2*L

b)

N = L + 1

c)

N = L - 1

d)

N = 2*L - 1

43.

Which of the following is incorrect with respect to binary trees?

a)

Let T be a binary tree. For every k ≥ 0, there are no more than 2k nodes in level k

b)

Let T be a binary tree with λ levels. Then T has no more than 2λ - 1 nodes

c)

Let T be a binary tree with N nodes. Then the number of levels is at least ceil(log (N + 1))

d)

Let T be a binary tree with N nodes. Then the number of levels is at least floor(log (N + 1))

44.

Which of the following is false about a binary search tree?

a)

The left child is always less than its parent

b)

The right child is always greater than its parent

c)

The left and right subtrees should also be binary search trees

d)

In-order traversal gives decreasing order of elements

45.

What is the specialty of the inorder traversal of a binary search tree?

a)

It traverses in a non-increasing order

b)

It traverses in an increasing order

c)

It traverses in a random fashion

d)

It traverses based on the priority of the node

46.

What are the worst-case and average-case complexities of a binary search tree?

a)

O(n), O(n)

b)

O(logn), O(logn)

c)

O(logn), O(n)

d)

O(n), O(logn)

47.

What are the conditions for an optimal binary search tree and what is its advantage?

a)

The tree should not be modified, and you should know how often the keys are accessed; it improves the lookup cost.

b)

You should know the frequency of access of the keys; it improves the lookup time.

c)

The tree can be modified, and you should know the number of elements in the tree beforehand; it improves the deletion time.

d)

The tree should just be modified and improves the lookup time.

48.

Which of the following is not a self-balancing binary search tree?

a)

AVL Tree

b)

2-3-4 Tree

c)

Red-Black Tree

d)

Splay Tree

49.

The binary tree sort implemented using a self-balancing binary search tree takes time in the worst case.

a)

O(n log n)

b)

O(n)

c)

O(n2)

d)

O(log n)

50.

An AVL tree is a self-balancing binary search tree, in which the heights of the two child subtrees of any node differ by

a)

At least one

b)

At most one

c)

Two

d)

At most two

51.

Associative arrays can be implemented using

a)

B-tree

b)

A doubly linked list

c)

A single linked list

d)

A self balancing binary search tree

52.

Which of the following is a self - balancing binary search tree?

a)

2-3 tree

b)

Threaded binary tree

c)

AA tree

d)

Treap

53.

A self - balancing binary search tree can be used to implement

a)

Priority queue

b)

Hash table

c)

Heap sort

d)

Priority queue and Heap sort

54.

In which of the following self - balancing binary search tree the recently accessed element can be accessed quickly?

a)

AVL tree

b)

AA tree

c)

Splay tree

d)

Red - Black tree

55.

The minimum height of self balancing binary search tree with n nodes is

a)

log2(n)

b)

n

c)

2n + 1

d)

2n - 1

56.

What is an AVL tree?

a)

a tree which is balanced and is a height balanced tree

b)

a tree which is unbalanced and is a height balanced tree

c)

a tree with three children

d)

a tree with atmost 3 children

57.

Why we need to a binary tree which is height balanced?

a)

to avoid formation of skew trees

b)

to save memory

c)

to attain faster memory access

d)

to simplify storing

58.

What is the maximum height of an AVL tree with p nodes?

a)

p

b)

log(p)

c)

log(p)/2

d)

P⁄2

59.

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

a)

just build the tree with the given input

b)

find the median of the set of elements given, make it as root and construct the tree

c)

use trial and error

d)

use dynamic programming to build the tree

60.

What maximum difference in heights between the leafs of a AVL tree is possible?

a)

log(n) where n is the number of nodes

b)

n where n is the number of nodes

c)

0 or 1

d)

atmost 1

61.

What is missing?

a)

Height(w-left), x-height

b)

Height(w-right), x-height

c)

Height(w-left), x

d)

Height(w-left)

62.

Why to prefer red-black trees over AVL trees?

a)

Because red-black is more rigidly balanced

b)

AVL tree store balance factor in every node which costs space

c)

AVL tree fails at scale

d)

Red black is more efficient

63.

Which of the following is the most widely used external memory data structure?

a)

AVL tree

b)

B-tree

c)

Red-black tree

d)

Both AVL tree and Red-black tree

64.

B-tree of order n is a order-n multiway tree in which each non-root node contains

a)

at most (n - 1)/2 keys

b)

exact (n - 1)/2 keys

c)

at least 2n keys

d)

at least (n - 1)/2 keys

65.

A B-tree of order 4 and of height 3 will have a maximum of keys.

a)

255

b)

63

c)

127

d)

188

66.

Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written?

a)

14

b)

7

c)

11

d)

5

67.

trees are B-trees of order 4. They are an isometric of trees.

a)

AVL

b)

AA

c)

2-3

d)

Red-Black

68.

What is the best case height of a B-tree of order n and which has k keys?

a)

logn (k+1) - 1

b)

nk

c)

logk (n+1) - 1

d)

klogn

69.

Which of the following is true?

a)

larger the order of B-tree, less frequently the split occurs

b)

larger the order of B-tree, more frequently the split occurs

c)

smaller the order of B-tree, more frequently the split occurs

d)

smaller the order of B-tree, less frequently the split occurs

70.

What is the best case for linear search?

4 lines
71.

What is the best case for linear search?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(1)

72.

What is the worst case for linear search?

a)

O(nlogn)

b)

O(logn)

c)

O(n)

d)

O(1)

73.

What is the best case and worst case complexity of ordered linear search?

a)

O(nlogn), O(logn)

b)

O(logn), O(nlogn)

c)

O(n), O(1)

d)

O(1), O(n)

74.

Which of the following is a disadvantage of linear search?

a)

Requires more space

b)

Greater time complexities compared to other searching algorithms

c)

Not easy to understand

d)

Not easy to implement

75.

Which of the following statements for a simple graph is correct?

a)

Every path is a trail

b)

Every trail is a path

c)

Every trail is a path as well as every path is a trail

d)

Path and trail have no relation

76.

For the given graph(G), which of the following statements is true?

a)

G is a complete graph

b)

G is not a connected graph

c)

The vertex connectivity of the graph is 2

d)

none

77.

What is the number of edges present in a complete graph having n vertices?

a)

(n*(n+1))/2

b)

(n*(n-1))/2

c)

n

d)

Information given is insufficient

78.

The given Graph is regular.

a)

True

b)

False

c)

none

d)

none

79.

A connected planar graph having 6 vertices, 7 edges contains regions.

a)

15

b)

3

c)

1

d)

11

80.

If a simple graph G, contains n vertices and m edges, the number of edges in the Graph G'(Complement of G) is

a)

(n*n-n-2*m)/2

b)

(n*n+n+2*m)/2

c)

(n*n-n-2*m)/2

d)

(n*n-n+2*m)/2

81.

Which of the following properties does a simple graph not hold?

a)

Must be connected

b)

Must be unweighted

c)

Must have no loops or multiple edges

d)

Must have no multiple edges

82.

What is the maximum number of edges in a bipartite graph having 10 vertices?

a)

24

b)

21

c)

25

d)

16

83.

Which of the following is true?

a)

A graph may contain no edges and many vertices

b)

A graph may contain many edges and no vertices

c)

A graph may contain no edges and no vertices

d)

A graph may contain no vertices and many edges

84.

For a given graph G having v vertices and e edges which is connected and has no cycles, which of the following statements is true?

a)

v=e

b)

v = e+1

c)

v + 1 = e

d)

v = e-1

85.

For which of the following combinations of the degrees of vertices would the connected graph be eulerian?

a)

1,2,3

b)

2,3,4

c)

2,4,5

d)

1,3,5

86.

A graph with all vertices having equal degree is known as a

a)

Multi Graph

b)

Regular Graph

c)

Simple Graph

d)

Complete Graph

87.

Which of the following ways can be used to represent a graph?

a)

Adjacency List and Adjacency Matrix

b)

Incidence Matrix

c)

Adjacency List, Adjacency Matrix as well as Incidence Matrix

d)

No way to represent

88.

The number of possible undirected graphs which may have self loops but no multiple edges and have n vertices is

a)

2((n*(n-1))/2)

b)

2((n*(n+1))/2)

c)

2((n-1)*(n-1))/2)

d)

2((n*n)/2)

89.

Given a plane graph, G having 2 connected component, having 6 vertices, 7 edges and 4 regions. What will be the number of connected components?

a)

1

b)

2

c)

3

d)

4

90.

Number of vertices with odd degrees in a graph having a eulerian walk is

a)

0

b)

Can't be predicted

c)

2

d)

either 0 or 2

91.

How many of the following statements are correct?

a)

All cyclic graphs are complete graphs.

b)

All complete graphs are cyclic graphs.

c)

All paths are bipartite.

d)

All cyclic graphs are bipartite.

92.

What is the number of vertices of degree 2 in a path graph having n vertices,here n>2.

a)

n-2

b)

n

c)

2

d)

0

93.

What would the time complexity to check if an undirected graph with V vertices and E edges is Bipartite or not given its adjacency matrix?

a)

O(E*E)

b)

O(V*V)

c)

O(E)

d)

O(V)

94.

With V(greater than 1) vertices, how many edges at most can a Directed Acyclic Graph possess?

a)

(V*(V-1))/2

b)

(V*(V+1))/2

c)

(V+1)C2

d)

(V-1)C2

95.

The topological sorting of any DAG can be done in time.

a)

cubic

b)

quadratic

c)

linear

d)

logarithmic

96.

If there are more than 1 topological sorting of a DAG is possible, which of the following is true.

a)

Many Hamiltonian paths are possible

b)

No Hamiltonian path is possible

c)

Exactly 1 Hamiltonian path is possible

d)

Given information is insufficient to comment anything

97.

Which of the given statement is true?

a)

All the Cyclic Directed Graphs have topological sortings

b)

All the Acyclic Directed Graphs have topological sortings

c)

All Directed Graphs have topological sortings

d)

All the cyclic directed graphs have non topological sortings

98.

What is the value of the sum of the minimum in-degree and maximum out-degree of an Directed Acyclic Graph?

a)

Depends on a Graph

b)

Will always be zero

c)

Will always be greater than zero

d)

May be zero or greater than zero

99.

Which data structure is typically used to implement breadth-first search (BFS) in a graph?

a)

Array

b)

Stack

c)

Queue

d)

Linked List

100.

Which of the following is a characteristic of a binary search tree (BST)?

a)

Nodes have at most two children

b)

Each node stores multiple values

c)

Unordered structure

d)

Allows cycles

101.

Which tree type maintains a balance by enforcing constraints on its nodes?

a)

B-Tree

b)

AVL Tree

c)

Red-Black Tree

d)

Binary Tree

102.

What is the primary purpose of a hash table in computer science?

a)

To represent hierarchical relationships

b)

To store data dynamically

c)

To store data in an unordered manner for fast access

d)

To store elements in order

103.

Which of these is not an example of a balanced binary search tree?

a)

Binary Tree

b)

AVL Tree

c)

Red-Black Tree

d)

B-Tree

104.

In which of the following scenarios would a priority queue be useful?

a)

Sorting a list of items

b)

Handling elements based on priority

c)

Managing function calls in recursion

d)

Storing large datasets

105.

What is the worst-case time complexity of quicksort?

a)

O(n)

b)

O(n log n)

c)

O(log n)

d)

O(n²)

106.

What does a min-heap property ensure?

a)

The root contains the minimum element

b)

Each node is larger than its children

c)

The tree is perfectly balanced

d)

The root contains the maximum element

107.

What is the main feature of a circular linked list?

a)

Elements are sorted

b)

Last node points to the first node

c)

Nodes have two pointers

d)

List has a fixed size

108.

What is the purpose of the depth-first search (DFS) algorithm in graph theory?

a)

To find the shortest path

b)

To check for cycles

c)

To visit all nodes by exploring as deep as possible

d)

To find the maximum node value

109.

Which data structure is used for efficient dynamic memory allocation?

a)

Linked List

b)

Hash Table

c)

Queue

d)

Stack

110.

Which of the following sorting algorithms is in-place?

a)

Bubble Sort

b)

Quick Sort

c)

Merge Sort

d)

none

111.

Which type of data structure is used to implement recursion?

a)

Array

b)

Tree

c)

Stack

d)

Linked List

112.

Which of the following trees allows for efficient insertion, deletion, and search operations with a logarithmic time complexity?

a)

AVL Tree

b)

Red-Black Tree

c)

B-Tree

d)

All of the above

113.

What is a tree in data structures?

a)

A linear data structure

b)

A non-linear data structure

c)

A type of array

d)

A fixed-size data structure

114.

What is the maximum number of children a binary tree node can have?

a)

One

b)

Two

c)

Three

d)

Unlimited

115.

What is the height of a tree?

a)

The number of nodes

b)

The number of edges from the root to the farthest leaf

c)

The total number of levels

d)

The number of leaf nodes

116.

In a binary tree, what is the maximum number of nodes at level n?

a)

n

b)

2^n

c)

2^(n-1)

d)

n^2

117.

What is a full binary tree?

a)

A tree with all levels fully filled

b)

A tree where every node has either 0 or 2 children

c)

A tree with a single path from root to leaf

d)

A tree with at least one leaf node

118.

What is a complete binary tree?

a)

A tree where all nodes have two children

b)

A tree where all levels are fully filled except possibly the last

c)

A tree with no leaf nodes

d)

A binary tree with only one path

119.

What is the purpose of a binary search tree (BST)?

a)

To store data in a non-linear format

b)

To allow efficient searching, insertion, and deletion

c)

To keep elements sorted

d)

All of the above

120.

What is the in-order traversal of a binary tree?

a)

Visit the root, then left subtree, then right subtree

b)

Visit the left subtree, then root, then right subtree

c)

Visit the right subtree, then root, then left subtree

d)

Visit nodes in level order

121.

What is the pre-order traversal of a binary tree?

a)

Visit the left subtree, then root, then right subtree

b)

Visit the root, then left subtree, then right subtree

c)

Visit the right subtree, then root, then left subtree

d)

Visit nodes in level order

122.

What is the post-order traversal of a binary tree?

a)

Visit the left subtree, then root, then right subtree

b)

Visit the root, then left subtree, then right subtree

c)

Visit the left subtree, then right subtree, then root

d)

Visit nodes in level order

123.

What is the worst-case time complexity for searching in a binary search tree?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n log n)

124.

Which of the following is NOT a property of a binary search tree?

a)

Left subtree nodes are less than the root

b)

Right subtree nodes are greater than the root

c)

All nodes must have two children

d)

Each subtree must also be a binary search tree

125.

What is the minimum height of a binary tree with n nodes?

a)

log(n)

b)

n

c)

log(n + 1)

d)

n - 1

126.

What is a balanced binary tree?

a)

A tree where all leaf nodes are at the same level

b)

A tree where the height difference between left and right subtrees is no more than one

c)

A tree that is complete

d)

A tree where every node has two children

127.

What is a binary heap?

a)

A complete binary tree that satisfies the heap property

b)

A type of binary search tree

c)

A linear data structure

d)

A tree with random node arrangement

128.

What is the space complexity for storing a binary tree?

a)

O(n)

b)

O(log n)

c)

O(1)

d)

O(n log n)

129.

Which traversal method is used to sort a binary search tree?

a)

In-order traversal

b)

Pre-order traversal

c)

Post-order traversal

d)

Level-order traversal

130.

What is the level of a node in a tree?

a)

The number of edges from the root to the node

b)

The height of the node

c)

The total number of nodes

d)

The depth of the node

131.

What is a leaf node in a tree?

a)

A node with no children

b)

A node with one child

c)

A node with two children

d)

A node that is the root

132.

Which data structure can be used to implement a tree?

a)

Array

b)

Linked list

c)

Both A and B

d)

None of the above

133.

What is the breadth-first search (BFS) traversal of a tree?

a)

Level-order traversal

b)

Pre-order traversal

c)

In-order traversal

d)

Post-order traversal

134.

What is a binary tree with all nodes having 0 or 1 child called?

a)

Complete binary tree

b)

Full binary tree

c)

Degenerate tree

d)

Balanced binary tree

135.

What is the depth of a node in a tree?

a)

The number of nodes from the root to the node

b)

The number of edges from the root to the node

c)

The height of the tree

d)

The level of the tree

136.

What is a B-tree?

a)

A binary search tree

b)

A self-balancing tree that maintains sorted data

c)

A complete binary tree

d)

A type of heap

137.

What is the height of a balanced binary tree with n nodes?

a)

log(n)

b)

n

c)

n/2

d)

log(n + 1)

138.

What is a Red-Black tree?

a)

A type of binary search tree

b)

A self-balancing binary search tree

c)

A binary heap

d)

A complete binary tree

139.

What is the main advantage of using a self-balancing tree?

a)

It requires less memory

b)

It maintains a balanced structure for efficient operations

c)

It is easier to implement

d)

It allows for random access

140.

What is a thread in a threaded binary tree?

a)

A pointer to the next node in in-order traversal

b)

A pointer to the parent node

c)

A pointer to a child node

d)

A pointer to the root node

141.

What type of tree is used to implement a priority queue?

a)

Binary search tree

b)

AVL tree

c)

Binary heap

d)

Red-Black tree

142.

What is the main characteristic of a ternary tree?

a)

Each node has up to three children

b)

Each node has up to two children

c)

It is a complete binary tree

d)

It is a degenerate tree

143.

What type of traversal uses a stack?

a)

Breadth-first search

b)

Depth-first search

c)

In-order traversal

d)

Both B and C

144.

What is the primary characteristic of a Splay tree?

a)

It is self-balancing

b)

It uses rotation to move frequently accessed nodes closer to the root