Ad
  • Custom User Avatar

    I have a similar issue when trying this in Python. All tests are passed, but exits with code 1, saying that I'm passing an empty argument to the max() function. In fact, it is a list with all the difference values. This is also surprising for me since indeed many people passed this kata.

    UPDATE: Just after writing the above, I went back to my solution and realised I didn't account for the case if one of the lists is empty, as the kata asks. That solved my issue. Please check if your solution fulfills all requirements and not just looks for the maximum difference in string lengths.

  • Custom User Avatar

    Yeah I just solved it for all cases that DON'T include number in the middle of the string, ran the test cases and learned the hard way that my code did not pass 2/13 tests...will require some rewriting :/

  • Custom User Avatar

    I was confused by the problem definition at first but figured it out, similar issue as many posters below. Find the longest string in the first array minus the shortest in the second array? No, that's not it. More test cases would have been good to illustrate.

    The other issue is I've solved the problem in Ruby, my code runs fine on my local machine. Then I do attempt and all cases pass but I get an exit code of 1. I solved the problem in 12 lines, and tells me there's an error on line 19 that 'length' is an unknown method. Not sure what's happening...