Skip to content

Commit c4287ee

Browse files
committed
Update combinations.py
1 parent 57a4a3f commit c4287ee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/combinations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def combine(self, n, k):
2626
def combineRecu(self, n, result, start, intermediate, k):
2727
if k == 0:
2828
result.append(intermediate[:])
29+
return
2930
for i in xrange(start, n):
3031
intermediate.append(i + 1)
3132
self.combineRecu(n, result, i + 1, intermediate, k - 1)

0 commit comments

Comments
 (0)