Palindrome Linked List in JavaScript (Optimal Approach)
Feb 6 · 2 min read · 🧠 Brute Force Approach (Not Optimal) A simple way is: Convert linked list into an array Check if array is palindrome But this uses extra memory: Time: O(n) Space: O(n) ❌ 🧠Optimal Approach 1. Find the Middle of the Linked List We use two poi...
Join discussion



