mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-03 16:08:02 +00:00
Fixed bug
This commit is contained in:
@@ -143,10 +143,10 @@
|
||||
"def permutations_alt(str1, str2):\n",
|
||||
" if len(str1) != len(str2):\n",
|
||||
" return False\n",
|
||||
" unique_counts2 = defaultdict(int)\n",
|
||||
" unique_counts1 = defaultdict(int)\n",
|
||||
" unique_counts2 = defaultdict(int)\n",
|
||||
" for char in str1:\n",
|
||||
" unique_counts2[char] += 1\n",
|
||||
" unique_counts1[char] += 1\n",
|
||||
" for char in str2:\n",
|
||||
" unique_counts2[char] += 1\n",
|
||||
" return unique_counts1 == unique_counts2"
|
||||
|
||||
Reference in New Issue
Block a user