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!
Select
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.
Google Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
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

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits