Question DSA-LL-0016
HardHow can you check whether a singly linked list is a palindrome in O(n) time and O(1) extra space?
- A.
Find the middle, reverse the second half in place, then compare the two halves
- B.
Push every node onto a stack
- C.
Sign up free to see the answer and a step-by-step explanation.