DEV Community

Saranya R
Saranya R

Posted on

Valid Anagram

Approach Explanation /(^ω^)/

  1. I counted how many times each letter appears in both strings using len function.
  2. If the counts match exactly, the strings are anagrams.
  3. Otherwise, return False.

Method Used: (〜 ̄▽ ̄)〜

  • Length check
  • Character frequency counting
  • Comparison of counts
  • Efficient solution

Top comments (0)