NEW
Font size
WorksheetsData Structures and Its Applications
Total questions: 30
Worksheet time: 23mins
1. What does Big O notation describe?
A) Space complexity
B) Worst-case time complexity
C ) Average-case time complexity
D) Best-case time complexity
2. Which notation describes the lower bound of an algorithm’s running time?
A) Big O
B) Omega
C) Theta
D) Small o
3. Which case complexity considers the average inputs?
A) Best case
B) Average case
C) Worst case
D) All of the above
4. What does asymptotic analysis focus on?
A) Real-time performance
B) Input size trends
C) Hardware efficiency
D) Algorithm pseudocode
5. The time complexity of accessing an element in an array is:
A) O(1)
B) O(n)
C) O(log n)
D) O(n log n)
6. Which notation describes the upper bound of an algorithm’s running time?
A) Big O
B) Omega
C) Theta
D) Small o
7. If an algorithm takes constant extra space, its space complexity is:
A) O(1)
B) O(n)
C) O(n^2)
D) O(log n)
8. What is the time complexity of a nested loop structure with two levels each iterating n times?
A) O(n)
B) O(log n)
C) O(n^2)
D) O(n log n)
9. Which notation provides an exact asymptotic behavior?
A) Big O
B) Omega
C) Theta
D) Little o
10. An algorithm has a complexity of O(n log n). Which of the following is an example?
A) Binary Search
B) Merge Sort
C) Insertion Sort
D) Bubble Sort
11. What does little o notation represent?
A) Exact asymptotic behavior
B) Upper bound but not tight
C) Lower bound
D) Best case behavior
What is the time complexity of a linear search algorithm?
A) O(1)
B) O(n)
C) O(n^2)
D) O(log n)
Which of the following algorithms has a time complexity of O(n^2)?
A) Quick Sort
B) Merge Sort
C) Selection Sort
D) Binary Search
What does the term 'space complexity' refer to?
A) The amount of memory an algorithm uses
B) The time taken by an algorithm
C) The number of operations performed
D) The input size of the algorithm
15. Which data structure follows Last-In-First-Out (LIFO)?
A) Queue
B) Array
C) Stack
D) Linked List
16. What is a circular queue?
A) A queue that overflows easily
B) A queue that wraps around
C) A queue that has only one element
D) None of the above
17. In which application would a stack be commonly used?
A) Undo operations
B) Call stack in recursive functions
C) Expression evaluation
D) All of the above
18. Which of the following allows for insertions and deletions at both ends?
A) Circular Queue
B) Deque
C) Stack
D) Priority Queue
19. In a singly linked list, each node contains:
A) Only data
B) Only the next node address
C) Data and the next node address
D) None of the above
Which data structure is used to implement a priority queue?
A) Array
B) Linked List
C) Heap
D) Stack
What is the average time complexity of searching for an element in a balanced binary search tree?
A) O(n)
B) O(log n)
C) O(n log n)
D) O(1)
22. In a binary tree, each node has at most:
A) One child
B) Two children
C) Three children
D) No children
23. Which traversal technique visits nodes in the order: left subtree, root, right subtree?
A) Preorder
B) Postorder
C) Inorder
D) Level order
24. A binary search tree (BST) is characterized by:
A) Ordered nodes
B) No left child
C) All children are leaves
D) All nodes are identical
25. Which of the following is a self-balancing binary search tree?
A) AVL Tree
B) Binary Tree
C) Ternary Tree
D) Circular Tree
26. Which sorting algorithm is known for its divide-and-conquer approach?
A) Selection Sort
B) Insertion Sort
C) Quick Sort
D) Bubble Sort
27. The time complexity of Merge Sort is:
A) O(n)
B) O(n log n)
C) O(n^2)
D) O(log n)
28. Which search algorithm is the most efficient for sorted arrays?
A) Sequential Search
B) Binary Search
C) Hashing
D) DFS
29. The time complexity of Binary Search is:
A) O(n)
B) O(log n)
C) O(n^2)
D) O(n log n)
30. Which of the following is a collision resolution technique in hashing?
A) Linear Probing
B) Quadratic Probing
C) Separate Chaining
D) All of the above
