Ad
  • Default User Avatar

    you must try to find if each word could find letters in sequence and that the sum of the two parts is equal to s

  • Custom User Avatar

    Yes. That's why it's ranked as a 5 kyu kata. It's not completely straight forward.

    A hint could be that if you don't know which part to use, try both.

    If you get completely stuck, you can always forfeit your experience and look at the existing solutions. While leveling up is nice, the main goal is learning and improving, right? :-)

  • Default User Avatar

    Since they can be in any order it makes really hard to predict in which part will be the correct letter and still we've to take care of duplications, the Kata tried to make things hard but it makes no sense at all since the input and part1 and part2 can vary so much that's pretty hard to cover all the situations.

  • Custom User Avatar

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

  • Default User Avatar

    Why the test should pass for: "Bannas from Bahamas"
    part1: Bahas
    part2: Bananas from am

    When it reaches the "h" we can see that it's out of order: "The restriction is that the characters in part1 and part2 should be in the same order as in s"

    An example of how it should be:
    s: c o d e w a r s = codewars
    part1: c d w = cdw
    part2: o e a r s = oears

  • Default User Avatar

    Yes, I notice this right now my code is right but the test won't pass, that's pretty frustrating.

  • Default User Avatar

    Thank you so much man, I was struggling very hard here and you saved me.