Question 131
[Q.31] What is the worst-case time complexity of Quick Sort?
Detailed Solution
Quick sort degrades to $O(n^2)$ worst case when pivot selection is poor (e.g. already sorted array).
[Q.31] What is the worst-case time complexity of Quick Sort?
Quick sort degrades to $O(n^2)$ worst case when pivot selection is poor (e.g. already sorted array).
[Q.32] Which data structure operates on a Last-In, First-Out (LIFO) basis?
Stack is LIFO (push/pop at top).
[Q.33] In-order traversal of a Binary Search Tree (BST) visits nodes in:
In-order traversal (Left, Root, Right) of BST yields keys in ascending order.
[Q.34] What is the average-case time complexity of searching an element in a Hash Table with good collision resolution?
Hash tables provide average constant time O(1) lookups.
[Q.35] Which graph traversal algorithm uses a Queue data structure?
BFS explores level by level using a Queue; DFS uses a Stack/recursion.