Ad
  • Custom User Avatar

    ahhhhh
    thank you - did not know that about the split

  • Custom User Avatar

    What you need to do:

    • Remove spaces before your split or else when you sort you will also sort the spaces which may not actually be in the test or original
    • Remove any characters that are not numbers or letters before you split, sort and join
  • Custom User Avatar

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

  • Custom User Avatar

    Ok, so second problem was the only one. You are not ignoring non-alphanumeric characters.
    When the original and test string have different number of spaces(or other punctuation), your function returns false instead of true.
    An anagram does not need to conserve whitespace, punctuation and the like.

  • Custom User Avatar

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

  • Custom User Avatar

    You did use the "mark as spoiler" on this comment right?
    You can use the same on your solution and only users who have already solved this problem will be able to see it.

    Based on the tests you fail, my guess is your solution is case sensitive instead of insensitive and does not get rid of non-alphanumeric characters.

    If that's not the case, I can't really say anything without seeing your solution.

  • Custom User Avatar

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