1 / 3

Solving the 2 Egg Problem: Efficient Egg Dropping Strategy in a 100-Story Building

In this problem, you have a 100-story building and 2 eggs, and your task is to determine the highest floor from which you can drop an egg without it breaking. If dropped from below this critical floor, the egg survives, while dropping from this floor or higher breaks it. To solve this efficiently, you need to minimize the number of drops required in the worst-case scenario. This guide explores step-by-step approaches, starting from simple solutions and progressing to more complex strategies that ensure finding the critical floor in the least number of attempts.

luann
Download Presentation

Solving the 2 Egg Problem: Efficient Egg Dropping Strategy in a 100-Story Building

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The 2 eggs problem (Google interview) • You have a 100-storie building, 2 eggs, and you are a busy man. Your goal is to find the highest floor from which you can still drop an egg without breaking it. Assume that if dropped from below that critical floor an egg always survives, while if dropped at or above – always breaks.

  2. Approach step-by-step, from simples to more complex solutions.

  3. Solution sketch:

More Related