Check if two strings are anagrams (contain same letters with same counts).
Two lines: str1, then str2.
"true" or "false".
Example 1:
Input:
s = "anagram" t = "nagaram"
Output:
true
Explanation:
Both have same letter counts.
All DSA practice problems · DSA mock interview · Mock interviews by company and role · Book a 1:1 interview