Ad
  • Custom User Avatar

    Adding a couple more of fixed tests isn't the solution.

    Yes, it is. I passed the kata without knowing I have an error. Only looking at other solutions made me realise I misunderstood the assignment (at first I assumed that 1 and 2 over interesting number should be classified as almost interesting).

    Palindrome error I made (my code worked for odd length input but didnt for even. e.g. 15751 was classified correctly but 1551 was not). This is exactly what edge case tests are for. For palindrome, one test case for even length and one for odd would catch that.

  • Custom User Avatar

    Two issues with attempts:

    1. returning 0 for 1221 (even number of digits in a palindrome) passes the kata, should require 2
    2. returning 1 for 1235 (1 or 2 bigger then interesting given number 1234 -> 1235) passes the kata, should only allow 0

    Those are two bugs I had in my initial solution that were not checked in an attempt. Having more simple test for those edge cases would be helpful.

    #python

  • Custom User Avatar

    Given an n x n array,

    Attempt gives [[]] which is not n x n (it is 0 x 1 array)

    No tests with n x m array. Please fix description

  • Custom User Avatar

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