Source Code: https://thecodingsimplified.com/check...
Solution:
First we'll reach till middle node & reverse list after middle node
Now seperate reverse list, which means you've two list now to compare
Now, compare both list one by one by comparing each node value
Time Complexity: O(n)
Space Complexity: O(1) as we're taking only constant variables
Please check video for more info:
This problem is similar to:
check if a linked list of string forms a palindrome,
check if a linked list of string forms by character a palindrome,
check if linked list is palindrome,
check if string is palindrome in linked list,
String palindrome,
palindrome,
linked list,
tutorial,
coding simplified,
java
CHECK OUT CODING SIMPLIFIED
/ codingsimplified
★☆★ VIEW THE BLOG POST: ★☆★
http://thecodingsimplified.com
I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 400+ videos.
★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
https://www.youtube.com/codingsimplif...
★☆★ SEND EMAIL At: ★☆★
Email: [email protected]