Question DSA-CX-0079
HardWhat is the expected time of quickselect for finding the k-th smallest of n elements with random pivots?
- A.
O(n²)
- B.
O(n)
- 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
Complexity Analysis question
What is the expected time of quickselect for finding the k-th smallest of n elements with random pivots?
O(n²)
O(n)
Sign up free to see the answer and a step-by-step explanation.
O(n log n)
O(log n)