Give the correct matching for the following pairs:
GATE CSE · Algorithms
Master topic for Sorting. Includes Merge Sort, Quick Sort, Heap and Heap Sort.
187 questions · 6 PYQs · 14 AI practice · GATE CSE 2027
Give the correct matching for the following pairs:
Quick-sort is run on two inputs shown below to sort in ascending order taking first element as pivot (i). (ii). Let and be the number of comparisons made for the inputs (i) and (ii) respectively. Then,
Merge sort uses:
Choose the correct alternatives (more than one may be correct) and write the corresponding letters only: Following algorithm(s) can be used to sort n in the range in O(n) time
Choose the correct alternatives (More than one may be correct). The complexity of comparision based sorting algorithms is:
Let P be a quicksort program to sort numbers in ascending order. Let and be the time taken by the program for the inputs and , respectively. Which of the following holds?
What is the time complexity of Quick Sort when the partitioning step always places the pivot in its correct sorted position?
Select one or more correct options regarding the worst-case scenario for Quick Sort.
Which of the following pivot selection strategies is MOST likely to lead to the worst-case complexity for Quick Sort?
What is the minimum number of comparisons required to sort an array of size 5 using Quick Sort?
Which of the following pivot selection strategies is LEAST likely to lead to the worst-case complexity for Quick Sort?
What is the worst-case time complexity of Quick Sort when the pivot selection strategy consistently chooses the smallest element?
If a Merge Sort implementation uses a non-stable merge step but ensures that the splitting step maintains the relative order of equal elements, will the overall algorithm be stable?
Which of the following is NOT a valid method for resolving collisions in hashing?
Consider a Quick Sort implementation where the partitioning step always places the pivot in its correct sorted position. What is the minimum number of comparisons required to sort an array of size 5?
In a Merge Sort implementation, if the merging step is modified to perform a stable merge, but the splitting step remains unchanged, what is the impact on the algorithm's space complexity?
Which of the following statements about hash functions are TRUE?
Consider a hash table with open addressing and quadratic probing. Which of the following scenarios would result in a situation where the search for an element fails even though the element is present in the table?
What is a suitable pivot selection strategy to minimize the chance of encountering the worst-case scenario in Quick Sort?
In a hash table with chaining, the load factor is 0.7. If the hash table has 1000 slots, what is the maximum number of elements that can be stored in the table without exceeding the load factor?
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 →