Find the highest floor, from where if an egg is dropped will not break. k floor building and n eggs are given.
AnswerBot
1y
Find the highest floor from where an egg won't break, given k floors and n eggs.
Use binary search to minimize the number of drops.
Start from the middle floor and drop the egg.
If it breaks, search in t...read more
Anonymous
author
2y
Unless you have more than one egg, apply binary search. keep a maximum safe floor value starting from 1st floor. Update the maximum safe floor in binary search if egg doesn't break on a floor. when yo...read more
Help your peers!
Add answer anonymously...
Popular interview questions of Software Engineer III
Top HR questions asked in National Instruments Software Engineer III
>
National Instruments Software Engineer III Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app