Find the Largest and Second Largest Elements
Find the Largest and Second Largest Balls
There are 32 balls with pairwise distinct weights. In one operation, you may compare exactly two balls and learn which one is heavier.
- What is the min...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
