Skip to content

Keep getting timeout #40

@abhishekvaid

Description

@abhishekvaid

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions