GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2026

GATE 2026 · DA · MCQ · 1 mark · Programming, Data Structures and Algorithms › Divide & Conquer (Mergesort, Quicksort)

GATE 2026 Data Science and Artificial Intelligence question: Consider that the quick sort algorithm is used to sort an array of n distinct randomly…

Consider that the quick sort algorithm is used to sort an array of distinct randomly ordered elements. In every call, the pivot is chosen as the first element of the current subarray.

Let denote the expected time to sort the array. Assume that the time to partition is linear in the size of the current subarray.

Which of the following recurrence relations correctly represents in this scenario?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Show answer

Official answer: D

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion