mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
tweak: must be same output string (#395)
This commit is contained in:
@ -8,7 +8,7 @@ const checkAnagram = (str1, str2) => {
|
|||||||
|
|
||||||
// If both strings have not same lengths then they can not be anagram.
|
// If both strings have not same lengths then they can not be anagram.
|
||||||
if (str1.length !== str2.length) {
|
if (str1.length !== str2.length) {
|
||||||
return 'Not Anagram'
|
return 'Not anagrams'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use hashmap to keep count of characters in str1
|
// Use hashmap to keep count of characters in str1
|
||||||
|
Reference in New Issue
Block a user