Egg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem Decomposition @BackToBackSWE
Egg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem Decomposition  @BackToBackSWE
Uploaded February 2019 | Updated November 2026, 3 hours ago
Free 5-Day Mini-Course: backtobackswe.com
Try Our Full Platform: backtobackswe.com/pricing
πŸ“Ή Intuitive Video Explanations
πŸƒ Run Code As You Learn
πŸ’Ύ Save Progress
❓New Unseen Questions
πŸ”Ž Get All Solutions


Question: You are given n eggs and specified a number of k floors. Write an algorithm to find the minimum number of drops is required to know the floor from which if the egg is dropped, it will break.

Note: There are more optimal solutions than this approach, but in a 45-minute interview they seem to me unreasonable to get. So I covered what one could reasonably deduce given they have never seen this question.


Complexities

Time: O( totalEggs * totalFloors^2 )

We will have totalEggs * totalFloors subproblems and spend O(totalFloors) time computing each subproblem.

Space: O( totalEggs * totalFloors )

We can upper bound to the number of subproblems which will be totalEggs * totalFloors subproblems (whether you include the base cases or not in the memoization table)

++++++++++++++++++++++++++++++++++++++++++++++++++

HackerRank: youtube.com/channel/UCOf7UPMHBjAavgD0Qw5q5ww

Tuschar Roy: youtube.com/user/tusharroy2525

GeeksForGeeks: youtube.com/channel/UC0RhatS1pyxInC00YKjjBqQ

Jarvis Johnson: youtube.com/user/VSympathyV

Success In Tech: youtube.com/channel/UC-vYrOAmtrx9sBzJAf3x_xw
Egg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem DecompositionImportant Coding Interview Concept | 3 Keys to Backtracking #shorts #datastructuresCoding Interview | Levels of a Binary Tree #shorts #datastructures #binarytree #codinginterviewGaurav Sen: Talking Daily Life At Uber & System Design Wisdom (The Back To Back Show - Show 1)The Change Making Problem - Fewest Coins To Make Change Dynamic ProgrammingInvestigating Heap Sort - Why Is Heap Sort Θ(n * log(n))? An Even Longer Really Long Answer.Build A Min Height BST From A Sorted Array | Coding Interview QuestionLinked Lists Explained | DSA Concept for BeginnersWhat Is Asymptotic Analysis? And Why Does It Matter? A Deeper Understanding of Asymptotic Notation.Implement A Max Stack - A Stack With A .max() API (Similar To Min Stack on LeetCode)All Nodes Distance K In A Binary Tree - Performing Bidirectional Search On A Tree Using A HashtableNetwork Flows: Max-Flow Min-Cut Theorem (& Ford-Fulkerson Algorithm)
Back To Back SWE |

Egg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem Decomposition

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER