Ad
  • Default User Avatar

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

  • Default User Avatar

    thanks a lot. it's a good comment.

  • Custom User Avatar

    No need to replace zeroes by zeroes ;)

  • Custom User Avatar

    Yes, I got some troubles with it too.
    On the output formatting paragraph, it says :
    "The two subarrays are sorted in ascending order by their number weights if these weights are different, BY THEIR INDEXES IN THE STRING IF THEY HAVE THE SAME WEIGHTS."

    The uppercase part of the paragraph is a lie.
    The only sort you have to follow is the one on the weights.

    Thank you, I just lost 30 minutes wondering why my solution wasn't working.

  • Custom User Avatar

    Thanks. I was aware that they aren't required, but I try to focus as much as possible on readable and maintainable code, and I find it much more readable with the parentheses.
    With that said, I probably should have come up with a better variable name than $arr!

  • Custom User Avatar

    You don't really need those parenthesis (just a little optimisation ^^)

  • Custom User Avatar

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