-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
I keep getting timeout on exercise 2.1. I copied the code and paste it into a local worksheet, it worked. The changes are minimal and can't be reduced:
def fib(n: Int): Int = { @annotation.tailrec def loop(n: Int, prev: Int, cur: Int): Int = if (n <= 1) prev else loop(n - 1, cur, prev + cur) loop(n, 0, 1) }
Metadata
Metadata
Assignees
Labels
No labels