CodeOath
← All problems

Palindrome Linked List

Easy
linked-listtwo-pointers

Given the head of a singly linked list, return true if it is a palindrome (reads the same forwards and backwards).

Lists in this problem are given as a plain array of values, in order.

Example:

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