234

· One step
LeetCode-234 Palindrome Linked List : 주어진 head가 palindrome인지 아닌지 note : range : 1~10^5MyAnswer :::python # Definition for singly-linked list. # class ListNode: # def init(self, val=0, next=None): # self.val = val # self.next = next class Solution: def isPalindrome(self, head: Optional[ListNode]) -> bool: temp: List = [] if not head: return True node = head while node is not None: temp.append(nod..
다했다
'234' 태그의 글 목록