Skip to content

Commit f032c1d

Browse files
committed
fix: early return 추가
1 parent 386e0ac commit f032c1d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

valid-anagram/sujeong-dev.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* @return {boolean}
55
*/
66
var isAnagram = function (s, t) {
7+
if (s.length !== t.length) return false;
8+
79
const frequencyMap = new Map();
810

911
for (const x of s) {

0 commit comments

Comments
 (0)