[leetcode-24] Swap-Nodes-In-Pairs_2
ยท
๐Ÿข One step
LeetCode-24 swap-nodes-in-pairs_2 : Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes note : only nodes themselves may be changed.MyAnswer :::python # Definition for singly-linked list. # class ListNode: # def init(self, val=0, next=None): # self.val = val # self.next = next class Solution: def swap..
๋‹คํ–ˆ๋‹ค
'24' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก