← Challenges

Valid Anagram

Write solve(s1, s2) that returns true if s2 is an anagram of s1 (same letters, same counts), false otherwise.

Examples

  • solve("listen", "silent")true
  • solve("rat", "car")false