summaryrefslogtreecommitdiff
path: root/progs/a709.py
blob: 7a8d089997002a728c8048bf3cca5c3f1cfa9323 (plain)
1
2
3
4
5
6
def zigzag(n, k): 
	if (n == 0 and k == 0): 
		return 1
	if (k == 0): 
		return 0
	return zigzag(n, k - 1) + zigzag(n - 1, n - k)