Skip to content
Snippets Groups Projects
Commit a44d5fb6 authored by Martin Mareš's avatar Martin Mareš
Browse files

fib.py: Trapná chyba

parent 0a827103
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ pamet = { 0: 0, 1: 1 }
def fib1(n):
if n not in pamet:
pamet[n] = fib(n-1) + fib(n-2)
pamet[n] = fib1(n-1) + fib1(n-2)
return pamet[n]
### Iterativní řešení
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment