Skip to content

Commit e3cac9d

Browse files
authored
Update catalan_recursive.py
1 parent e63ac07 commit e3cac9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Competitive Coding/Math/Catalan_Numbers/catalan_recursive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ def catalan_numbers(n):
66
res += catalan_numbers(i) * catalan_numbers(n-i-1) #The recursive function call
77
return res
88

9-
for i in range(5): #Implements the algo and finds the first 5 catalan numbers
10-
print catalan_numbers(i)
9+
if __name__=='__main__':
10+
print "The 10th catalan number is:",catalan(9)

0 commit comments

Comments
 (0)