206. Reverse Linked List
·
Algorithm
Reverse Linked List - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Stack을 사용한 풀이 class Solution: def reverseList(self, head: ListNode) -> ListNode: if not head: return None stack = [] cur = head while cur: stack.append(cur) cur = cur.next new_head = stack.pop() cur = new_head..