Ad
  • Custom User Avatar

    Maybe this will help maybe not, just write it on paper or white board and iterate as you would on a computer. It helped me to solve the banana one. Still got one more random always failing.

  • Custom User Avatar

    Just wrote an algo today and I was very confident it would pass all.
    Bananas and the random test are edge cases, and as Abbe mentioned very tricky. I have to rethink my algorithm now.

  • Custom User Avatar

    You could always use print to print things. Try the following:

    def is_merge(s, s1, s2):
        print('s:', s)
        print('s1:', s1)
        print('s2:', s2)
        ...
    

    That being said, the 'Bananas from Bahamas' test is tricky. It's why it's a 5 kyu kata. :-)

    Good luck and let me know if I can help you more!

  • Default User Avatar

    I always get errors for this kata on python.
    On one hand it fails at 'Bananas from Bahamas' and then always at some test case. The code passes all other tests however.
    I can never see, what exactly the error is, i.e. what arguments are passed on to the function in the respective test. It would help alot, since I have no idea about the nature of the error.
    What are the strings passed in 'Bananas from Bahamas'?