CodeMosa
Master LeetCode Patterns
All Patterns
Collections
Sign In
Back
Hash Map Patterns
Question 1 of 12
8% Complete
Easy
To check if two strings are anagrams, what's the most efficient approach?
A
Use a frequency map to count characters in both strings
B
Sort both strings and compare
C
Check each character one by one
D
Use two pointers
Need a hint?
Think about character frequencies