Easy · Strings
Valid 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
Core interview problems are free with a full runner and lessons; Pro opens the complete library.