Ad
  • Custom User Avatar

    Approved, closing this suggestion~

  • Custom User Avatar

    Approved.

  • Default User Avatar

    I have 2 suggestions.

    1. Specify the limits for n ( 0<=n<=94 in most languages ) in the description to set expectations and also becuase it's a best practice
    2. Use the max case as one of the test cases: nth_fib(94) == 12,200,160,415,121,876,738

    unsigned long long max value == 18,446,744,073,709,551,615

  • Custom User Avatar

    Lua translation open for review, feedback would be appreciated !

  • Custom User Avatar

    No, there is no n0:

    when given a number n (n >= 1 ), returns the nth number in the Fibonacci Sequence.

    1st = 0
    2nd = 1
    3rd = 1
    4th = 2
    

    Like it's shown in the kata's description.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar

    Sometimes in the testcases in Python nth_fib(0) is tested which should be -1 so a solution in which you doesn't take this edge case into account the code is not accepted, but sometimes this testcase does not appear and the solution is not accepted. It also doesn't make sense, that the 0-th Fibonacci number is -1

  • Custom User Avatar
  • Custom User Avatar

    Update available here ( this fork modifies the description ).

  • Custom User Avatar

    ( JS )

    • Reference solution recursively calls user solution.
    • Random generation only generates odd numbers.

    ( All )

    • Description does not specify n starts from 1.
  • Custom User Avatar

    If you spoiler the suggestion, I don't see it ( no notifications are sent for spoilers ). It has already been approved I see.

    Thanks for fixing. However. + has higher precedence than |, so now only odd numbers are generated. Also, you missed that the reference solution calls the user solution recursively ( not your fault of course ).

    I'll open a new Issue.

  • Custom User Avatar

    Approved!

  • Default User Avatar

    So cool kata> Thanks)

  • Loading more items...