Dell Technologies Interview Question: C puzzle- There is a tower of... | Glassdoor.co.in

Interview Question

Associate Software Engineer Interview Bengaluru

C puzzle- There is a tower of some N storeys find the first

  floor from where when an egg is dropped may break.Use minimum number of eggs and minimum number of times u drop the eggs.
Answer

Interview Answer

2 Answers

1

It can be solved by binary search approach.He was satisfied with my answer

Interview Candidate on 20-Jul-2017
0

x(x+1)/2 = 100 => x=14 (start dropping from 14, if doesn't break, go on like 14+13, then 14+13+12...unti it becomes 100)
worst case : 14 (if one egg breaks in 14th, start dropping other from floor 1-13 nd if no where it breaks 14th is the threshold)

Ashutosh on 17-Sep-2017

Add Answers or Comments

To comment on this, Sign In or Sign Up.