I hereby claim:
- I am ldmoray on github.
- I am ldmoray (https://keybase.io/ldmoray) on keybase.
- I have a public key whose fingerprint is ACB8 3C5C 018D FB4E A302 AC43 9BB6 14C3 C5AE 6BD5
To claim this, I am signing this object:
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# https://gist.github.com/ldmoray/90845fae1fef04e56518fc58e1d50857 | |
# Characters | |
SEGMENT_OPEN="[" | |
SEGMENT_CLOSE="]" | |
PLUSMINUS="\u00b1" | |
CROSS="\u2718" | |
LIGHTNING="\u26a1" |
I hereby claim:
To claim this, I am signing this object:
class DynamicFib: | |
def __init__(self): | |
self.memo = {0: 0, 1: 1} | |
def fib(self, n): | |
if n not in self.memo: | |
self.memo[n] = self.fib(n-1) + self.fib(n-2) | |
return self.memo[n] | |
def slow_fib(n): |