WorksheetsADSA_Unit-1_ Quiz-1
Total questions: 50
Worksheet time: 50mins
Which of the following is NOT a characteristic of a good algorithm?
Finiteness
Effectiveness
Ambiguity
Feasibility
Which of these is not part of space complexity?
Input space
Auxiliary space
Compilation space
Output space
In the algorithm analysis, T(p)=C(p)+R(p) refers to:
Space complexity formula
Time complexity formula
Recursion time
None of the above
The purpose of using algorithms is:
To reduce memory
To avoid errors
To get output efficiently
To avoid recursion
What is the main difference between data and information?
Information is raw, data is processed
Data is raw, information is processed
Both are same
Information is random
Which of the following is used for time complexity analysis?
Memory graph
Time graph
Asymptotic notations
Control flow graph
In the algorithm syntax, the keyword used to start an algorithm is:
procedure
start
Algorithm
function
Which of the following operations does not affect space complexity much?
Recursion
Variable declarations
Input storage
Loop iterations
Which notation gives the worst-case performance of an algorithm?
Θ(n)
Ω(n)
O(n)
o(n)
Which of the following notations gives both upper and lower bounds?
O(n)
Ω(n)
Θ(n)
ω(n)
What does the omega (Ω) notation describe?
Best case
Worst case
Average case
None of the above
If an algorithm has T(n) = o(n log n), what does it imply?
Grows faster than n log n
Grows slower than n log n
Grows at same rate as n log n
Constant time
Which of the following is the correct representation of time complexity for bubble sort (worst case)?
O(n)
O(n log n)
O(n²)
O(1)
The notation ω(f(n)) provides:
Loose upper bound
Tight upper bound
Strict lower bound
Constant space
Which notation means the function becomes insignificant compared to f(n)?
Θ(f(n))
o(f(n))
ω(f(n))
O(f(n))
What is the best-case complexity of bubble sort?
Ω(n)
Θ(n log n)
Θ(n²)
O(n³)
What notation is used when an algorithm takes at most f(n) time?
Ω(f(n))
Θ(f(n))
O(f(n))
ω(f(n))
Which of the following notations indicate that the algorithm always takes time proportional to f(n)?
Θ(f(n))
O(f(n))
o(f(n))
Ω(f(n))
Which of the following is true about little omega notation?
T(n) is smaller than f(n)
T(n) is much faster than f(n)
T(n) is equal to f(n)
T(n) is slower than f(n)
What is the graphical representation in Θ(f(n)) notation?
Curve lies above f(n)
Curve lies below f(n)
Curve lies between two constants multiplied by f(n)
Curve is exponential
AVL Tree is named after:
Allen, Venn, Lewis
Adelson-Velsky and Landis
Andrew, Victor, Leo
Alexander, Vincent, Lee
What is the balancing factor for a balanced AVL tree node?
{-2, 0, 2}
{-1, 0, 1}
{-3, 0, 3}
{0, 1}
Which rotation is used when the tree becomes left-heavy then right-heavy?
Left-Left Rotation
Right-Right Rotation
Left-Right Rotation
Right-Left Rotation
What is the time complexity for insertion in AVL Tree?
O(1)
O(n)
O(log n)
O(n²)
Which of these is NOT an application of AVL Trees?
Sorted data collections
Efficient searching
Complex indexing
Image compression
What is the rotation used when both child and grandchild are on the right?
Right-Right Rotation
Right-Left Rotation
Left-Left Rotation
Left-Right Rotation
What happens when a root node is deleted in AVL tree?
Tree crashes
Rebalancing is not required
In-order predecessor/successor is used
New tree is created
AVL Tree is a type of:
Heap Tree
General Tree
Balanced Binary Search Tree
B-Tree
Which of the following is NOT a disadvantage of AVL Trees?
Complex implementation
More time consuming
Sorted storage
Costly rotations
Why is AVL tree better for searching than BST?
Always balanced
Needs more space
Not suitable for small data
Takes more time
B-Tree is designed for:
Short data sets
Large databases
Real-time systems
Image processing
What is the minimum number of children for an internal node in B-tree of order M?
0
1
⌈M/2⌉
M
In B-Tree, all leaf nodes:
Have one key
Are at same level
Have no children
Have only left child
The root node in B-Tree must have at least:
0 children
1 child
2 children
M children
Which of the following is NOT true about B-Tree?
Nodes have more than one key
All nodes have same number of children
Keys are stored in sorted order
Internal nodes can store keys
Where are elements inserted in B-Trees?
Root
Leaf
Internal Node
Random
When a node in B-Tree is full, what happens?
Tree is destroyed
Tree is rebalanced
Node is split
Node is skipped
What is the maximum number of keys a node in B-Tree of order M can have?
M
M+1
M-1
M/2
Searching in a B-Tree begins from:
Leaf
Root
Middle
Random
Which bias conditions are used in B-Tree splitting?
Left and Right
Binary and Ternary
Single and Multiple
Top and Bottom
In B-Tree deletion, if key is found in internal node, it is replaced by:
Any value
Root value
Inorder predecessor or successor
NULL
One major advantage of B-Trees is:
No rebalancing
Linear access
Efficient disk access
Fixed height
B-Tree is mostly used in:
Audio processing
Database systems
Operating systems
Image compression
Which of the following is a disadvantage of B-Tree?
Self-balancing
Quick access
High memory consumption
Efficient indexing
B-Tree allows multiple children due to:
Binary structure
Multiple root nodes
Multiple key storage per node
Incomplete nodes
The height of a B-Tree depends on:
Leaf nodes only
Number of keys
Order "M"
Rotations
How many keys does the root node of a B-Tree usually have?
M
M-1
1
0
What is the key property of internal nodes in B-Tree?
Always full
Balanced
Have at least ⌈M/2⌉ children
Leaf-level nodes
What is the time complexity of searching in a B-Tree?
O(n)
O(log n)
O(n log n)
O(1)
Why are B-Trees preferred in databases?
Simple implementation
Stores unsorted data
Supports multilevel indexing
Small size
