일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- concurrency
- Generator
- DWG
- t1
- Class
- 밴픽
- Convert Sorted List to Binary Search Tree
- Python
- LeetCode
- data science
- 운영체제
- 프로그래머스
- 715. Range Module
- 43. Multiply Strings
- iterator
- attribute
- kaggle
- 109. Convert Sorted List to Binary Search Tree
- Regular Expression
- 30. Substring with Concatenation of All Words
- 315. Count of Smaller Numbers After Self
- Decorator
- 시바견
- Protocol
- 컴퓨터의 구조
- Substring with Concatenation of All Words
- 파이썬
- Python Code
- shiba
- Python Implementation
Archives
- Today
- Total
목록25. Reverse Nodes in k-Group (1)
Scribbling
LeetCode: 25. Reverse Nodes in k-Group
Recursion solution. Time Complexity: O(N), Memory Complexity: O(1) # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseKGroup(self, head: Optional[ListNode], k: int) -> Optional[ListNode]: return self.helper(head, k) def helper(self, node, k): if not node: return None cur = node for i in ran..
Computer Science/Coding Test
2021. 8. 25. 22:55