We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19b5614 commit 21b4ce2Copy full SHA for 21b4ce2
solution/0887.Super Egg Drop/Solution.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def superEggDrop(self, K: int, N: int) -> int:
3
+ dp = [1] * (K)
4
+ while dp[K - 1] < N:
5
+ for i in range(K - 1, 0, -1):
6
+ dp[i] = dp[i] + dp[i - 1] + 1
7
+ dp[0] = dp[0] + 1
8
+ return dp[0]
solution/README.md
@@ -943,7 +943,8 @@
943
│ └── Solution.py
944
├── 0887.Super Egg Drop
945
│ ├── README.md
946
-│ └── Solution.java
+│ ├── Solution.java
947
+│ └── Solution.py
948
├── 0889.Construct Binary Tree from Preorder and Postorder Traversal
949
950
0 commit comments