A10 Networks

  www.a10networks.com
Work in HR? Unlock Free Profile

A10 Networks Support Engineer Interview Question (student candidate)

I interviewed in San Jose, CA and was asked:
"You have a building with 100 stories, and two identical balls. Your goal is to discover the topmost level from which the balls can be dropped without breaking. Do this in the least number of tries (drops)."
Tags: brain teaser, logic
Add Tags [?]
Answer

Part of a Support Engineer Interview Review - one of 21 A10 Networks Interview Reviews

Answers & Comments

3
of 4
votes

Drop from 10th floor. If that works, drop from 20th floor. Etc. Until you reach a floor where the ball breaks. Say it's 70th floor. Then you know the highest floor is between 61 and 69, so you have at most 9 more drops. Worst case is floor 99 or 100, which you can find in 19 drops. This strategy will find the highest floor in any building of N floors in at most ((2*sqrt(N)) - 1) tries.

- CH on Dec 21, 2011
0
of 2
votes

Try to breakup the numbers into groups of 3 (B1floor, B2floor, remaining).
Let answer be: 55
Try 1 (breakup into 30,30,40remain): B1-Floor 30, B2-Floor 60, B2 breaks, B1 doesn't
So, answer < 60
Try 2: B1-Floor 20, B2-Floor 40, B1, B2 both survive
So, 40 < answer < 60.
Try 3(breaking into three 7's) : B1 - Floor 47, B2-Floor 54, B1,B2 both survive
So answer is bigger than 54 but less than 60.
54<answer < 60.
Try 4 (breaking into 2's): B1 - Floor 56, B2-Floor 58 B1, B2 both break.
So, answer is less than 56 and 58 but more than 54.
So, answer is 55.

Objective is to narrow down the range between a,b where (a<answer<b) at each try.

- Smita on Dec 25, 2011

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

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