Font size
S
M
L
XL
WorksheetsIT221-FINAL-REVIEWER
Total questions: 50
Worksheet time: 50mins
Name
Class
Date
1.
What is a tree in data structures?
a)
A linear data structure
b)
A non-linear hierarchical data structure
c)
A sequential storage method
d)
A network topology
2.
The root of a tree has how many parents?
a)
Zero
b)
One
c)
Two
d)
Multiple
3.
A node with no children is called what?
a)
Root node
b)
Parent node
c)
Leaf node
d)
Sibling node
4.
Which of the following are tree traversal methods?
a)
Preorder
b)
Inorder
c)
Postorder
d)
Sideorder
5.
In a binary tree each node has at most how many children?
a)
One
b)
Two
c)
Three
d)
Four
6.
What does DLR represent in tree traversal?
a)
Delete Left Right
b)
Data Left Right
c)
Down Left Return
d)
Divide Left Right
7.
In Preorder traversal when is the root visited?
a)
First
b)
Between subtrees
c)
Last
d)
After left only
8.
Which traversal visits the root between subtrees?
a)
Preorder
b)
Inorder
c)
Postorder
d)
Level Order
9.
In Postorder traversal when is the root visited?
a)
First
b)
Between subtrees
c)
Last
d)
Before right only
10.
Select all types of binary trees.
a)
Strict Binary Tree
b)
Full Binary Tree
c)
Complete Binary Tree
d)
Partial Binary Tree
11.
A strict binary tree requires each node to have how many children?
a)
Only one child
b)
Either zero or two children
c)
Always two children
d)
Any number of children
12.
In a full binary tree where are all leaf nodes located?
a)
At different levels
b)
At the same level
c)
Only on left side
d)
Only on right side
13.
What is the formula for total nodes in a full binary tree of height h?
a)
2^h
b)
2^(h+1) - 1
c)
2^h - 1
d)
h^2
14.
The number of leaf nodes in a full binary tree of height h is?
a)
h
b)
2^h
c)
2^(h-1)
d)
2^(h+1)
15.
Which traversal uses a queue data structure?
a)
Preorder
b)
Inorder
c)
Postorder
d)
Level Order
16.
Select applications of binary trees.
a)
Expression trees in compilers
b)
Huffman coding for compression
c)
Binary Search Trees
d)
Linear search algorithms
17.
Children of the same parent are called what?
a)
Cousins
b)
Siblings
c)
Descendants
d)
Neighbors
18.
The set of all nodes at a given depth is called?
a)
Branch
b)
Level
c)
Layer
d)
Generation
19.
What is a Binary Search Tree (BST)?
a)
A tree with two roots
b)
A tree where left children are smaller and right children are larger than parent
c)
A tree with no particular order
d)
A balanced tree only
20.
In BST all nodes in the left subtree have values compared to parent?
a)
Greater than
b)
Less than
c)
Equal to
d)
Unrelated to
21.
In BST all nodes in the right subtree have values compared to parent?
a)
Less than
b)
Greater than
c)
Equal to
d)
Unrelated to
22.
What is the average time complexity for BST search operations?
a)
O(1)
b)
O(log n)
c)
O(n)
d)
O(n^2)
23.
Select the main BST operations.
a)
Insert
b)
Delete
c)
Search
d)
Compile
24.
In BST new elements are always inserted at which position?
a)
Root
b)
Internal node
c)
Leaf position
d)
Middle of tree
25.
What happens when BST elements are inserted in sorted order?
a)
Tree becomes balanced
b)
Tree becomes a linked list
c)
Tree becomes full
d)
Tree becomes complete
26.
Select types of balanced search trees.
a)
AVL Tree
b)
Red-Black Tree
c)
Splay Tree
d)
Circular Tree
27.
An AVL tree maintains a height difference of at most how much between subtrees?
a)
Zero
b)
One
c)
Two
d)
Three
28.
Which balanced tree reorganizes to bring frequently accessed nodes closer to root?
a)
AVL Tree
b)
Red-Black Tree
c)
Splay Tree
d)
B-Tree
29.
B-Trees and B+ Trees are commonly used in which applications?
a)
Web browsers
b)
Databases and file systems
c)
Game engines
d)
Graphics rendering
30.
When deleting a leaf node from BST what is the process?
a)
Delete it directly
b)
Replace with left child
c)
Replace with right child
d)
Cannot delete leaves
31.
A graph is a collection of vertices and what else?
a)
Trees
b)
Edges
c)
Levels
d)
Layers
32.
What does ADT stand for in data structures?
a)
Automatic Data Type
b)
Abstract Data Type
c)
Advanced Data Transfer
d)
Application Design Tool
33.
Select fundamental graph operations.
a)
addVertex
b)
addEdge
c)
removeVertex
d)
compileGraph
34.
In an undirected graph do edges have direction?
a)
Yes
b)
No
c)
Sometimes
d)
Only for cycles
35.
In a directed graph (digraph) what do edges have?
a)
No direction
b)
A specific direction
c)
Multiple directions
d)
Circular paths
36.
A weighted graph has edges with associated what?
a)
Colors
b)
Weights or costs
c)
Names
d)
Priorities
37.
Select types of graphs based on connectivity.
a)
Connected Graph
b)
Disconnected Graph
c)
Weighted Graph
d)
Directional Graph
38.
A graph with at least one cycle is called?
a)
Acyclic
b)
Cyclic
c)
Linear
d)
Sequential
39.
A sparse graph has how many edges?
a)
Maximum possible
b)
Few edges relative to maximum
c)
All possible edges
d)
No edges
40.
A dense graph has how many edges?
a)
Few edges
b)
No edges
c)
Many edges near maximum
d)
Zero edges
41.
What graph operation returns vertices adjacent to a given vertex?
a)
getVertices
b)
getNeighbors
c)
getDegree
d)
hasEdge
42.
The degree of a vertex is the number of what?
a)
Paths
b)
Edges connected to it
c)
Vertices in graph
d)
Cycles through it
43.
Select graph representation methods.
a)
Adjacency matrix
b)
Adjacency list
c)
Array only
d)
Stack only
44.
A connected graph has a path between which vertices?
a)
Some vertices
b)
Every pair of vertices
c)
Only adjacent vertices
d)
No vertices
45.
At what level is the root node in a tree?
a)
Level zero
b)
Level one
c)
Level two
d)
Highest level
46.
Is an empty tree considered a valid binary tree?
a)
Yes
b)
No
c)
Sometimes
d)
Only if specified
47.
Priority Queue using heaps supports operations in what time complexity?
a)
Constant time
b)
Logarithmic time
c)
Linear time
d)
Quadratic time
48.
Expression trees are primarily used in what?
a)
Databases
b)
Compilers
c)
Operating systems
d)
Networks
49.
The number of NULL pointers in a complete binary tree of n nodes is?
a)
n
b)
n + 1
c)
n - 1
d)
2n
50.
In tree traversal each node is processed how many times?
a)
Zero times
b)
Exactly once
c)
Twice
d)
Multiple times
Reset
