GATE Programming, Data Structures and Algorithms: Searching and sorting algorithms – Previous Year Questions
6 GATE previous year questions on Searching and sorting algorithms (Programming, Data Structures and Algorithms, Data Science and Artificial Intelligence) with answers and explanations, from every paper.
- GATE 2024 DA Q40 – Let F(n) denote the maximum number of comparisons made while searching for an entry in a sorted array of size n using binary search. Which ONE of the…
- GATE 2024 DA Q45 – Consider the following sorting algorithms: (i) Bubble sort (ii) Insertion sort (iii) Selection sort Which ONE among the following choices of sorting…
- GATE 2025 DA Q27 – For which of the following inputs does binary search take time O( n) in the worst case?
- GATE 2025 DA Q29 – Suppose that insertion sort is applied to the array [1, 3, 5, 7, 9, 11, x, 15, 13] and it takes exactly two swaps to sort the array. Select all…
- GATE 2026 DA Q31 – Let A be a sorted array containing 1000 distinct integers. You perform a recursive binary search on A to find an element y. Suppose each comparison…
- GATE 2026 DA Q49 – Consider the problem of sorting the given array in ascending order: P = [1, 2, 3, 5, 4] Consider two sorting algorithms Bubble Sort (BS) and Insertion…