일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Python Implementation
- 315. Count of Smaller Numbers After Self
- data science
- Convert Sorted List to Binary Search Tree
- Class
- 파이썬
- 밴픽
- kaggle
- 시바견
- 43. Multiply Strings
- Decorator
- Protocol
- concurrency
- 운영체제
- 715. Range Module
- 30. Substring with Concatenation of All Words
- Python Code
- attribute
- 컴퓨터의 구조
- Regular Expression
- DWG
- Substring with Concatenation of All Words
- Generator
- t1
- LeetCode
- Python
- 109. Convert Sorted List to Binary Search Tree
- shiba
- 프로그래머스
- iterator
Archives
- Today
- Total
목록328. Odd Even Linked List (1)
Scribbling
LeetCode: 328. Odd Even Linked List
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def oddEvenList(self, head: Optional[ListNode]) -> Optional[ListNode]: if not head: return None odd_ptr = head even_ptr = even_head = ListNode() cur = head.next cnt = 2 while cur != None: if cnt % 2 != 0: odd_ptr.next = cur odd_ptr = cur else: even_pt..
Computer Science/Coding Test
2021. 12. 31. 20:06