Ad
  • Custom User Avatar

    I know this is late, but the kata defines 0 as the 1st fibonnaci number.

  • Custom User Avatar

    yeah, but you're still computing again and again the same primes. Think about a way to avoid that.

  • Custom User Avatar

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

  • Custom User Avatar

    not an issue, a question. ;)

    You need a more efficient algorithm, and think about avoiding useless (re)computations

  • Custom 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
  • Default User Avatar

    Your code passess the tests with Python 3.6 but not with Python 3.4 which is set as default. I assume that you use Python >= 3.6 in IDLE, which has order-preserving dict type (see here). You have two options: 1) switch the Python version in CW (there's a dropdown), 2) change your code to not depend on order-preserving behavior.

    Regards,

    suic

  • Custom User Avatar

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

  • Custom User Avatar

    thank you, this made the solution even easier :)

  • Custom User Avatar

    They're ordered by appearance, not by appearance count.

    Count the number of occurrences of each character and return it as a list of tuples in order of appearance.

  • Custom User Avatar

    [Ruby] All my random string tests are failing and the expected results don't look right. Example result:

    Expected: [["k", 2], ["o", 5], ["r", 5], ["s", 5], ["n", 4], ["t", 5], ["m", 7], ["w", 4], ["x", 6], ["i", 6], ["f", 3], ["d", 5], ["z", 5], ["a", 2], ["b", 6], ["h", 6], ["j", 3], ["l", 5], ["g", 2], ["q", 3], ["c", 3], ["p", 2], ["v", 2], ["e", 2], ["u", 2]], instead got: [["m", 7], ["x", 6], ["i", 6], ["b", 6], ["h", 6], ["o", 5], ["r", 5], ["s", 5], ["t", 5], ["d", 5], ["z", 5], ["l", 5], ["n", 4], ["w", 4], ["f", 3], ["j", 3], ["q", 3], ["c", 3], ["k", 2], ["a", 2], ["g", 2], ["p", 2], ["v", 2], ["e", 2], ["u", 2]]
    

    This does not look like that they are ordered by appearance count.

  • Custom User Avatar

    I just checked on multiple sites how fibonacci works and all the test cases are wrong if I follow the fibonacci definition.

  • Custom User Avatar

    You didn't specify the language, but based on your profile I guess it's ruby. However, I see no issues with the ruby version.

  • Custom User Avatar

    This kata still broken with wrong test after 3 years?

  • Loading more items...