Skip to main content

Check for Anagrams

JUNIOR

Check for Anagrams

Check if two strings are anagrams of each other.

Requirements:

  • Anagrams have same characters in different order
  • Ignore case and spaces
  • Return true if anagrams, false otherwise

Example:

Input: "listen", "silent"
Output: true

Input: "hello", "world"
Output: false

Examples:

Input 1:{"s":"listen","t":"silent"}
Output 1:true
Input 2:{"s":"hello","t":"world"}
Output 2:false

Loading editor...

Run your code to see results

Click the Run button above