Skip to content

Commit

Permalink
Update super-egg-drop.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 authored Aug 12, 2018
1 parent 29426f3 commit cfec5f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Python/super-egg-drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ def superEggDrop(self, K, N):
:rtype: int
"""
def check(n, K, N):
total = 0
c = 1
# Each combinatin of n moves with k broken eggs could represent a unique F.
# Thus, the range size of F that all cominations can cover
# is the sum of C(n, k), k = 1..K
total, c = 0, 1
for k in xrange(1, K+1):
c *= n-k+1
c //= k
Expand Down

0 comments on commit cfec5f0

Please sign in to comment.