Easy · Strings

Is anagram

Given two strings s and t of lowercase English letters, return true if t is an anagram of s (it uses exactly the same letters, each the same number of times) and false otherwise.

Examples

Example 1

{
  "s": "anagram",
  "t": "nagaram"
}

Output: true (anagram)

Example 2

{
  "s": "rat",
  "t": "car"
}

Output: false (not anagram)

Rebuild it in the studio

Open every published interview problem, solution, scene, and memory room free, with no account.

More Strings problems