Skip to content

Commit 7eb6656

Browse files
committed
reformatting
1 parent 410ad39 commit 7eb6656

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

counting-bits/bhyun-kim.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ def countBits(self, n: int) -> List[int]:
5555

5656
from typing import List
5757

58+
5859
class Solution:
5960
def countBits(self, n: int) -> List[int]:
60-
output = [0] * (n+1)
61+
output = [0] * (n + 1)
6162

62-
for i in range(1, n+1):
63+
for i in range(1, n + 1):
6364
output[i] = output[i >> 1] + (i & 1)
6465

6566
return output

group-anagrams/bhyun-kim.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,16 @@
2929

3030
class Solution:
3131
def groupAnagrams(self, strs: List[str]) -> List[List[str]]:
32-
3332
hash_table = dict()
3433
output = []
3534

3635
for s in strs:
37-
count_s = ''.join(sorted(s))
36+
count_s = "".join(sorted(s))
3837
if count_s in hash_table:
3938
idx = hash_table[count_s]
4039
output[idx].append(s)
4140
else:
4241
hash_table[count_s] = len(output)
4342
output.append([s])
44-
45-
return output
4643

44+
return output

0 commit comments

Comments
 (0)