The GATE Grind

GATE Programming, Data Structures and Algorithms: Divide and conquer: mergesort and quicksort – Previous Year Questions

2 GATE previous year questions on Divide and conquer: mergesort and quicksort (Programming, Data Structures and Algorithms, Data Science and Artificial Intelligence) with answers and explanations, from every paper.

  1. GATE 2024 DA Q30 (1 mark, Numerical answer) – Consider sorting the following array of integers in ascending order using an in-place Quicksort algorithm that uses the last element as the pivot. 60…
  2. GATE 2026 DA Q15 (1 mark, Multiple choice) – Consider that the quick sort algorithm is used to sort an array of n distinct randomly ordered elements. In every call, the pivot is chosen as the…