QueraltSM / EggDroppingPuzzle

Dynamic Programming Solution for Egg Dropping Puzzle

Home Page:https://www.geeksforgeeks.org/python-program-for-egg-dropping-puzzle-dp-11/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Egg Dropping Puzzle

Dynamic Programming Solution for Egg Dropping Puzzle
Suppose there is a building with "k" floors and we have "n" eggs, and we want to answer the following question:
how can we find the minimum number of attempts to find a floor from which it is safe to drop an egg without breaking it?

Things you must to know:

  • When an egg did not break from a certain floor, it did not break on any lower floor either.
  • If an egg breaks on a certain floor, then it will break on all the upper floors.
  • When an egg breaks, it must be discarded, otherwise we can use it again.

Captura de pantalla 2019-06-20 a las 23 39 03