This Python template lets you get started quickly with a simple one-page playground.
# A recursive function to find nth catalan number
# Base Case
if n <= 1:
# Catalan(n) is the sum of catalan(i)*catalan(n-i-1)
res = 0
for i in range(n):
#finish the missing code in the line above
# Driver Program to test above function
for i in range(15):
print(catalan(i), end=' ')
If you want a more complex example (external libraries, viewers...), use the Advanced Python template
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.