Palindrome List
October 2, 2018
Today’s exercise sounds like a homework problem:
Write a program that determines if a linked list of integers is palindromic — i.e., reads the same in both directions. Your solution must operate in O(1) space.
Your task is to write a program to determine if a list of integers is palindromic, in O(1) space. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.
A couple of solutions in Racket.
Here’s a solution in C.
Examples:
A solution in commonlisp:
https://pastebin.com/5XStJYwq