Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- A* Algorithm
- Two Pointers
- sorting
- stack
- String
- Java
- dfs
- Medium
- array
- leetcode
- BFS
- graph
- heap
- SinglyLinkedList
- Hashtable
- Leedcode
- 자료구조
- python3
- greedy
- hash table
- ArrayList vs LinkedList
- Easy
- LinkedList
- Union Find
- DailyLeetCoding
- 광연자동차운전면허학원
- VCS
- Bellman-Ford
- hash
- 구현
Archives
- Today
- Total
목록Linked List (1)
Min IT's Devlog
풀이 일자: 23.05.16 난이도: [Medium] 분류: [Linked List] 문제 내용 문제의 내용은 주어진 LinkedList를 홀수번 째 있는 노드와 짝수번 째 노드의 앞뒤를 바뀌는 문제이다. 문제 해결 흐름 1. 단순히 LinkedList의 자료구조 문제이기 때문에 그냥 풀면 된다. class Solution: def swapPairs(self, head: Optional[ListNode]) -> Optional[ListNode]: node = head; i = 1; pprev = None; prev = None; h = None; if node == None or node.next == None: return node; while node: if i & 1: prev = node; nod..
코테/LeetCode(Solve)
2023. 5. 16. 16:27