일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
Tags
- kaggle
- 109. Convert Sorted List to Binary Search Tree
- iterator
- 운영체제
- Python Code
- LeetCode
- Substring with Concatenation of All Words
- concurrency
- 밴픽
- Python Implementation
- DWG
- t1
- 30. Substring with Concatenation of All Words
- Python
- 파이썬
- 컴퓨터의 구조
- Decorator
- 시바견
- shiba
- Regular Expression
- 715. Range Module
- Class
- 프로그래머스
- 43. Multiply Strings
- 315. Count of Smaller Numbers After Self
- Generator
- Convert Sorted List to Binary Search Tree
- Protocol
- attribute
- data science
Archives
- Today
- Total
목록92. Reverse Linked List II (1)
Scribbling
LeetCode: 92. Reverse Linked List II
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseBetween(self, head: Optional[ListNode], left: int, right: int) -> Optional[ListNode]: new_head = ListNode(val=0, next=head) count = 0 ptr = new_head prev, cur = None, new_head nxt = head for i in range(left): prev = cur cur = nxt nxt = cur...
Computer Science/Coding Test
2021. 10. 12. 22:41