Gradient LabSign up free

Home / GATE DA / 2024 / Q.30

GATE DA 2024, Q.30: Swaps when quicksort meets a sorted array

Data structures and algorithmsQuicksort swaps1 markNumerical answer

The question

The array 60, 70, 80, 90, 100 is sorted in ascending order with in-place Quicksort using the last element as the pivot. What is the minimum number of swaps performed?

Checking your access…

Source: official GATE DA 2024 question paper and answer key (IISc Bengaluru). The question is lightly reworded; every number and option is kept.