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!