Question DSA-SORT-0048
MediumQuick sort always picks the last element as pivot. Which input gives the worst case?
- A.
A random array
- B.
An already sorted array
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Sorting question
Quick sort always picks the last element as pivot. Which input gives the worst case?
A random array
An already sorted array
Sign up free to see the answer and a step-by-step explanation.
An array of distinct random numbers
An array with one element