Skip to content

Practice Palindrome Linked List

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#234
LeetCode Problem

Palindrome Linked List

Problem Statement

Given the head of a singly linked list, return true if it is a palindrome or false otherwise.

Source: Palindrome Linked List on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
head = [1,2,2,1]
Output
true

# Example 2

Input
head = [1,2]
Output
false

Constraints

The number of nodes in the list is in the range [1, 10^5].
0 <= Node.val <= 9

Related LeetCode Problems

Practice more problems similar to Palindrome Linked List.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.