Skip to content

Commit

Permalink
[LC] 240818 fix line break lint
Browse files Browse the repository at this point in the history
  • Loading branch information
HaJunYoo committed Aug 18, 2024
1 parent 0c8f197 commit b9ae750
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contains-duplicate/hajunyoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ def containsDuplicate(self, nums: List[int]) -> bool:
string_len = len(nums)
set_len = len(set(nums))

return string_len != set_len
return string_len != set_len
3 changes: 1 addition & 2 deletions kth-smallest-element-in-a-bst/hajunyoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
class Solution:
# Time complexity: O(n)
def kthSmallest(self, root: Optional[TreeNode], k: int) -> int:

self.count = 0
self.result = 0

Expand All @@ -28,4 +27,4 @@ def dfs(node):
dfs(node.right)

dfs(root)
return self.result
return self.result
3 changes: 1 addition & 2 deletions number-of-1-bits/hajunyoo.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Solution:
# Time complexity: O(log n)
def hammingWeight(self, n: int) -> int:
n = int(n)
cnt = 0
while n > 0:
if n % 2 == 1:
cnt += 1
n = n // 2
return cnt
return cnt
2 changes: 1 addition & 1 deletion palindromic-substrings/hajunyoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def two_pointer_expand(left, right):
# 2, 4, 6 ...
two_pointer_expand(i, i + 1)

return self.count
return self.count
2 changes: 1 addition & 1 deletion top-k-frequent-elements/hajunyoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def topKFrequent(self, nums: List[int], k: int) -> List[int]:
count_list.sort(key=lambda x: x[1], reverse=True)
answer = [a for a, b in count_list[:k]]

return answer
return answer

0 comments on commit b9ae750

Please sign in to comment.