about | help | code help+videos | done | prefs |
fibIter
A recursive method of Fibonacci that uses tail recursion. You may not call the recursion more than once. When f1 and f2 are 1 and 0 the output of fibIter(n,f1,f2) will be the nth Fibonacci number such that 0:1, 1:1, etc. fibIter(0, 1, 0) → 0 fibIter(1, 1, 0) → 1 fibIter(2, 1, 0) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy