Python concise solution 135 ms runtime

  • 0
    class Solution(object):
        def isPalindrome(self, head):
            :type head: ListNode
            :rtype: bool
            list = [] 
            if head is None or is None:
                return True 
            while head is not None:
                head =
            return list == list[::-1]

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.