5. Palindrome Linked List #
Created Saturday 18 January 2020
- For uni or empty, return true.
- Move to the first half.
- Check if odd or even. Move to the first node of the right side LL.
- Start reversing from this part of the LL.
- Once done, traverse from head to NULL and for the reverse LL.
- Both the trav will now hit NULL at the same time, so checking any one is fine.
- Continue the iteration as long as the values are equal, if they aren’t, return false.
- When you exit the loop return true.