Palindrome Linked List

Easy · Linked Lists · about 15 minutes

Asked at Meta, Amazon, Microsoft, Apple.

Decide whether the values of a singly linked list form a palindrome, i.e. read identically from the first node to the last and from the last to the first. Can you hit O(n) time with O(1) extra memory?

Related guides