Ad
  • 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

    it's fantastic. Thank you!

  • Custom User Avatar

    Expected and actual values are inverted in the tests, you're returning str when n is 0 with your code.

  • Custom User Avatar

    If you look at the top of the kata, you will see that it says, "Postgresql 9.6" or something similar. That tells you the specific version of SQL being used for this kata. Search online for the appropriate function to use for postgresql. It's similar to hex().

  • Custom User Avatar

    If you look at the top of the kata, you will see that it says, "Postgresql 9.6" or something similar. That tells you the specific version of SQL being used for this kata. Search online for the appropriate function to use for postgresql. It's similar to hex().

  • 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

    There is only one such test case in the fixed tests and its set to false which is expected. It might appear in random tests sometimes and if you get true from it, then the problem is with your code. So i suggest you check your code. :)

  • Custom User Avatar

    Consider this array:

    Array
    (
    [0] => 3
    [1] => 1
    [2] => 2
    [3] => 3
    [4] => 0
    )

    It keeps repeating in various tests, and it is marked as true in one test (edge cases), while it is marked as false in random tests. Also, is this array really a Madhav array? I'm guessing it's not, since it should have 6 elements. That is, there's no a[5], and there's no way that we would have:

    a[0] = a[1] + a[2] = a[3] + a[4] + a[5]

    Isn't one of the prerequisites for a Madhav array that it has 3, 6, 10, 15, etc elements, and only that many, not one more or less? The sums check out, but the number of addends does not.

  • Custom User Avatar

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