Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 290 Bytes

File metadata and controls

21 lines (14 loc) · 290 Bytes

Problem 234: Palindrome Linked List

Difficulty: Easy

Problem

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

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

Example

Example 1:
Input: 1->2
Output: false

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