Solution to the Egg Drop problem using dynamic problem