mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
Create Non-crossing-lines-to-connect-points-in-a-circle
This commit is contained in:
parent
6a95bf9ad8
commit
98db791d37
|
@ -0,0 +1,10 @@
|
|||
def count(n):
|
||||
if (n & 1):
|
||||
return 0
|
||||
val = n // 2
|
||||
dy_lst = [1 for i in range(val + 1)]
|
||||
for i in range(2, val + 1):
|
||||
dy_lst[i] = 0
|
||||
for j in range(i):
|
||||
dy_lst[i] += (dy_lst[j] * dy_lst[i - j - 1])
|
||||
return dy_lst[val]
|
Loading…
Reference in New Issue
Block a user