Question DSA-ARR-0057
MediumWhat is the minimum number of comparisons needed to find both the maximum and minimum of n elements, using pairs?
- A.
About 3n/2
- B.
n log 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
Arrays question
What is the minimum number of comparisons needed to find both the maximum and minimum of n elements, using pairs?
About 3n/2
n log n
Sign up free to see the answer and a step-by-step explanation.
2n − 2
n − 1