Ad
  • Default User Avatar

    When I tried to solve it, I thought that it is worth a 4 or even a 3 kyu difficulty badge, but once I succeeded, I think this is something between 5 and 4. There are some easier 4 kyu problems than this, but also there are more difficult 5 kyu problems out there IMHO.

    Great kata by the way, thanks. It was fun to solve.

  • Default User Avatar

    Your enconding should transform the input string "()()()" to a binary tree and that will solve the problem. It is an assumption bias that "()()" encodes something that has 2 branches, so "()()()" should encode something with 3 branches.

  • Default User Avatar

    Happened to me as well. I got an "inc x 0" instruction. My pattern matching is now uglier, because I had to prepare recognizing syntactically incorrect lines.

  • Default User Avatar

    Thank you. :)

  • Default User Avatar

    This is perfectly ok, obviously, this does not make solving the problem impossible. What I would like to say is if this is intentional (as it appears to be) than this should be stated in the problem description: "It is guaranteed that the weight array is at least as long as the number of names" or similar. There is no public test case that would call attention to this possibility.

  • Default User Avatar

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