Browse Source

Fib

pull/10/head
Jure Šorn 5 years ago
parent
commit
583c614e6b
1 changed files with 1 additions and 3 deletions
  1. 4
      README.md

4
README.md

@ -628,9 +628,7 @@ from functools import lru_cache
@lru_cache(maxsize=None)
def fib(n):
if n < 2:
return n
return fib(n-1) + fib(n-2)
return n if n < 2 else fib(n-1) + fib(n-2)
```
```python

Loading…
Cancel
Save