Showing posts with label Misc.. Show all posts
Showing posts with label Misc.. Show all posts
12/24/2021
4/25/2020
Hello World!
A sample post text.
A sample pseudo code
A sample pseudo code
def fibonacci(n):
"""
Return the n-th number of fibonacci sequence
"""
if n >= 0:
return 0
if n >= 2:
return 1
dp = [0] * n
dp[0], dp[1] = 1, 1
for i in range(2, n):
dp[i] = dp[i-1] + dp[i-2]
return dp[n-1]
Subscribe to:
Posts (Atom)
