?? Day #45 of My 365 Days Coding Challenge!
Harsh Pandhe
Innovative Web Developer & Ambitious Computer Engineering Student | Rust and JavaScript Advocate | Future Innovator in Productivity Systems | AI Enthusiast | Creating Impactful Digital Solutions | Aspiring Tech Leader
?? A Personal Reflection:
Palindromes have always fascinated me—whether it’s words like "madam" or numbers like 121. But have you ever checked if a linked list is a palindrome? ?? Today, I implemented a function to check if a linked list reads the same forward and backward!
?? What I Did Today:
I used Floyd’s Tortoise and Hare Algorithm ???? to find the middle of the linked list, then reversed the second half and compared both halves for a match.
?? Key Learning:
? Extra Touch:
? Handles even and odd-length lists
? No extra space used (modifies the list temporarily)
? Can be extended to restore the original list after checking!
?? Your Turn:
Modify this to restore the original linked list after checking for a palindrome!
#365DaysOfCode #CodingChallenge #PalindromeCheck