Select one or more correct options regarding the average-case complexity of Quick Sort.
GATE CSE · Algorithms
Master topic for Sorting. Includes Merge Sort, Quick Sort, Heap and Heap Sort.
187 questions · 0 PYQs · 20 AI practice · GATE CSE 2027
Select one or more correct options regarding the average-case complexity of Quick Sort.
A hash table uses a hash function h(x) = x mod m, where m is the size of the table. If the table size is 10 and the elements to be inserted are {12, 22, 32, 42}, what is the load factor after inserting all elements?
Consider a modified version of Merge Sort where, instead of recursively dividing the input into halves, it divides it into thirds. What is the time complexity of this modified algorithm in its worst-case scenario?
Which of the following statements about the stability of Merge Sort is FALSE?
What is the maximum depth of recursion in Quick Sort for an input array of size 'n' in the worst case?
Select one or more correct options regarding the recurrence relation for Merge Sort. Assume n represents the input size.
Which of the following sequences represent a valid max-heap stored in a 1-indexed array?
The number of distinct max-heaps that can be formed using the integers is:
What is the average number of comparisons needed to find an element in a hash table with open addressing and linear probing, assuming uniform hashing and no collisions?
Universal hashing selects a hash function randomly from a family H of hash functions. A family H is called universal if for any two distinct keys k₁ and k₂, the probability that h(k₁) = h(k₂) is at most 1/m, where m is the table size. What does universal hashing guarantee?
Consider a min-heap of elements. To find the -th smallest element, what is the time complexity of the most efficient approach using the heap?
The load factor at which the expected number of probes for an unsuccessful search using linear probing reaches 50 probes is closest to:
The recurrence relation for the time complexity of merge sort on an array of elements is . Using the Master theorem, what is the time complexity of merge sort in the worst case?
What is the time complexity of building a max-heap from an unsorted array of elements using the standard algorithm (calling on each non-leaf node from bottom to top)?
Which of the following correctly describes the relationship between quick sort's worst case and the input being sorted?
Consider quick sort on the array with the first element as pivot (Hoare scheme). The first pass produces a partition. How many elements end up to the left of the pivot (in a position smaller than the pivot's final resting index) after one full Lomuto partition with pivot (first element, moved to last for Lomuto)?
Merge sort is a divide and conquer algorithm. Which of the following correctly describes the three phases of merge sort?
Which of the following are TRUE about introsort, the hybrid sorting algorithm used in many standard library implementations?
The total number of comparisons performed by merge sort to sort an array of elements in the worst case is:
In a hash table of size m using chaining, the expected time for an unsuccessful search under simple uniform hashing is:
Want unlimited AI-generated Sorting questions?
Sign up free and practice with adaptive difficulty — Easy, Medium, Hard. New questions every session.
Start practising for free →