Rahul-Vijay / C_plus_plus_Algos

Collection of C++ Algorithms for a quick reference. Fork it and start hacking :)
0 stars 32 forks source link

Added Egg Dropping Puzzle #48

Closed pidwid closed 4 years ago

pidwid commented 4 years ago

Added this new puzzle "Egg Dropping from floors"

Egg dropping refers to a class of problems in which it is important to find the correct response without exceeding a (low) number of certain failure states. In a toy example, there is a tower of nnn floors, and an egg dropper with mmm ideal eggs. The physical properties of the ideal egg is such that it will shatter if it is dropped from floor n∗n^n∗ or above, and will have no damage whatsoever if it is dropped from floor n∗−1n^-1n∗−1 or below. The problem is to find a strategy such that the egg dropper can determine the floor n∗n^*n∗ in as few egg drops as possible. This problem has many applications in the real world such as avoiding a call out to the slow HDD, or attempting to minimize cache misses, or running a large number of expensive queries on a database.

Rahul-Vijay commented 4 years ago

Thanks @pidwid