mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Fixed bug
This commit is contained in:
parent
a18e0532b0
commit
a3c45ae613
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user