Skip to content

Latest commit

 

History

History

palindrome_linked_list_234

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

234. Palindrome Linked List

https://leetcode.com/problems/palindrome-linked-list/

Description

Given a singly linked list, determine if it is a palindrome.

Example 1:

Input: 1->2
Output: false

Example 2:

Input: 1->2->2->1
Output: true

Follow up: Could you do it in O(n) time and O(1) space?