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 e63ac07 commit e3cac9dCopy full SHA for e3cac9d
Competitive Coding/Math/Catalan_Numbers/catalan_recursive.py
@@ -6,5 +6,5 @@ def catalan_numbers(n):
6
res += catalan_numbers(i) * catalan_numbers(n-i-1) #The recursive function call
7
return res
8
9
-for i in range(5): #Implements the algo and finds the first 5 catalan numbers
10
- print catalan_numbers(i)
+if __name__=='__main__':
+ print "The 10th catalan number is:",catalan(9)
0 commit comments