3.6 of 5 7,024 reviews Redmond, WA 5000+ Employees

Microsoft Software Development Engineer In Test Intern Interview Question (student candidate)

I interviewed in Redmond, WA and was asked:
"You have a building with 100 stories. You also have two glass balls. You can drop the glass balls as many times as you want before they break. How can you find the floor at which they start breaking with the fewest number of drops?"
Tags: brain teaser
Add Tags [?]
Answer Flag Question

Part of a Software Development Engineer In Test Intern Interview Review - one of 3,166 Microsoft Interview Reviews

Answers & Comments

of 0
Not truly a brain teaser because the answer is mathematical.
- Interview Candidate on Apr 21, 2012 Flag Response
of 3
If you have N stories, you use the first glass ball to increment by sqrt(N) stories. Once that ball breaks, you use your second to go to the level of sqrt(N) below where it broke, and increment floor by floor. You know it must break somewhere in that group of sqrt(N) stories. I believe this method gets you a runtime of O(n^0.5).
- Alex on May 2, 2012 Flag Response
of 1
search for "two egg problem". its a minimization of maximum regret problem
- moataz on Oct 4, 2012 Flag Response

To comment on this question, Sign In with Facebook or Sign Up

Microsoft – Why Work for Us?

What do you want in a job? Do you want more than a paycheck? At Microsoft, you can discover potential you didn’t know you had, push your limits, turn your ideas into reality and make a real impact on the industry and… Full Overview

Provided by employer [?]

Tags are like keywords that help categorize interview questions that have something in common.

Glassdoor is your free inside look at Microsoft interview questions and advice. All interview reviews posted anonymously by Microsoft employees and interview candidates.