Ad
  • Custom User Avatar

    Ruby 3.0 should be enabled.

  • Custom User Avatar

    Ruby 3.0 should be enabled.

  • Custom User Avatar

    Description is overly verbose especially this sentence:

    "So what will be your task? You should write a function fib, that takes one parameter steps, and returns a number from the Fibonacci sequence, based on the parameter steps, which determines the position in Fibonacci number."

  • Custom User Avatar

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

  • Custom User Avatar

    In order to test memoization (which I think you're doing since you give the fibNum array), you should use larger numbers so people don't use a simple recursive function without memoization.

  • Default User Avatar

    When I run what code I have through the submit button, it passes the normal tests, but fails every single one ofthe random tests. From what I can tell, the random tests seem to be considering the right answer to be the same string as the input i'm given! For context, here's one of the messages I'm getting from the random tests section (In ruby, if it's any help?)
    Testing for mCklt84;Yda y; #I"m assuming that this is the input here?
    Expected: "mCklt84;Yda y;", instead got: "nXpog84;Bwz b;" #And here, the expected result is the same as the input!
    I'm probably reading things wrong, but help would still be really appreciated, as this has happened on a few other katas I've tried.

  • Custom User Avatar

    Yup, sorry!

    Don't want to discourage you, but Codewars is completely full up on Fibonacci. :-)