Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
    • Classic Brain Teasers
      • 9 Balls, 1 Heavier, 2 Weighings
      • 2 Eggs and 100 Floors
      • Burning Ropes to Measure 45 Minutes
      • Measure 4 Liters with 3L and 5L Jugs
      • Bridge and Torch (1, 2, 7, 10 Minutes)
      • 100 Prisoners and One Light Switch
    • Probability Puzzles
    • Digital Logic Puzzles
    • Debugging Riddles
    • Logic & Aptitude Puzzles: Tricky Q&A
  • Scenario & Debug Puzzles25
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Classic Brain Teasers
  1. Topics
  2. DV Interview Puzzles
  3. Logic & Aptitude Puzzles
  4. Classic Brain Teasers
  5. 2 Eggs and 100 Floors

VLSI DV Interview Puzzles · All levels

2 Eggs and 100 Floors

You have 2 identical eggs and a 100-floor building. Find the highest safe floor in the worst case with minimum drops.

On this page

    Puzzle

    Difficulty: Medium · Puzzle 2 of 6 · Topic: Classic Brain Teasers

    You have 2 identical eggs and a 100-floor building. Find the highest safe floor in the worst case with minimum drops.

    Hint

    Use decreasing step sizes so worst-case paths equalize.

    Step-by-step solution

    Diagram
    1) Suppose first egg drops at floors x, x+(x-1), x+(x-1)+(x-2), ...
    2) If first egg breaks on k-th drop, second egg does linear search in previous interval of size at most x-(k-1)-1.
    3) Worst-case drops are x because first-egg drop count plus second-egg linear steps is bounded by x.
    4) Need x + (x-1) + ... + 1 >= 100 => x(x+1)/2 >= 100.
    5) Smallest integer x is 14 since 14*15/2 = 105.
    6) Strategy: drop at 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, ...

    Answer

    Answer: Minimum worst-case drops = 14 using decreasing intervals.

    Why candidates get it wrong

    Using fixed interval 10 gives up to 19 drops, not optimal worst case.

    Interviewer follow-up

    How does the method generalize to 3 eggs and 100 floors?

    Related topics

    • Back to Classic Brain Teasers

    • Logic & Aptitude Puzzles section

    Previous

    156 / 210

    Next: Burning Ropes to Measure 45 Minutes

    Up next

    Up nextBurning Ropes to Measure 45 Minutes

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Measure 4 Liters with 3L and 5L Jugs
    • Bridge and Torch (1, 2, 7, 10 Minutes)
    • 100 Prisoners and One Light Switch