Created
September 9, 2019 17:37
-
-
Save fakedrake/6c73aa2a223f325ac66bc8b415fbcc23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def lookup_fun(buf, end, addr): | |
return buf[(n + end) % 4] | |
def fun(n): | |
buf = [1,1,2,4,8] | |
end = 0 | |
for i in range(n + 1): | |
buf[end] = sum(buf) | |
end = (end + 1) % 4 | |
return buf[end] |
Author
fakedrake
commented
Sep 9, 2019
- Backtracking
- Recursion
- Dynamic programming
- Ring buffer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment