Given n pens and n tops, each pen (and each top) having a size different than the other and each pen fitting exactly one top, find the largest pen using minimum number of comparisons. A comparison involves picking a pen and a top and trying to fit them, and would result in a. proper fit b. pen is larger c. top is larger

AnswerBot
2y
Find largest pen using minimum comparisons with tops.
Divide pens into two groups and compare largest pen from each group with largest top.
Repeat the process with the group containing the largest pen u...read more
Help your peers!
Add answer anonymously...
Google Software Developer interview questions & answers
A Software Developer was asked 1mo agoQ. How would you design a Chrome update deployment strategy?
A Software Developer was asked 1mo agoQ. What are your goals?
A Software Developer was asked 2mo agoQ. What is the explanation of the Least Recently Used (LRU) cache algorithm?
Popular interview questions of Software Developer
A Software Developer was asked 1mo agoQ1. What are your goals?
A Software Developer was asked 2mo agoQ2. What is the explanation of the Least Recently Used (LRU) cache algorithm?
A Software Developer was asked 3mo agoQ3. What programming languages are you familiar with?
Top HR questions asked in Google Software Developer
A Software Developer was asked 2mo agoQ1. Why should we choose you?
A Software Developer was asked 3mo agoQ2. How does the role fit your career plans?
A Software Developer was asked 8mo agoQ3. Explain your project in detail.
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

