Palindrome Linked List | 4 Approaches | Leetcode 234| codestorywithMIK
Whatsapp Community Link : https://www.whatsapp.com/channel/0029... This is the 21st Video of our Playlist "Linked List : Popular Interview Problems". In this video we will try to solve an easy but very good practice problem asked by Google : Palindrome Linked List | 4 Approaches | Leetcode 234| codestorywithMIK I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY. We will do live coding after explanation and see if we are able to pass all the test cases. Also, please note that my Github solution link below contains both C++ as well as JAVA code. Problem Name : Palindrome Linked List | 4 Approaches | Leetcode 234| codestorywithMIK Company Tags : GOOGLE My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie... Leetcode Link : https://leetcode.com/problems/palindr... My DP Concepts Playlist : • Roadmap for DP | How to Start DP ? | Topic... My Graph Concepts Playlist : • Graph Concepts & Qns - 1 : Graph will no m... My Recursion Concepts Playlist : • Introduction | Recursion Concepts And Ques... My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Intervie... Instagram : / codestorywithmik Facebook : / 100090524295846 Twitter : / cswithmik Subscribe to my channel : / @codestorywithmik Approach Summary : Sure, here's a brief summary of each approach: 1. **Approach-1 (Using extra space)**: This approach involves using extra space to store the values of the linked list in an array. It iterates through the linked list to populate the array and then compares elements from both ends of the array to check for palindrome. Time Complexity: O(n) - where n is the number of elements in the linked list. Space Complexity: O(n) - due to the extra space used to store the values. 2. **Approach-2 (Reversing the 2nd half of linked list)**: This approach involves reversing the second half of the linked list and then comparing it with the first half. It uses two pointers technique (slow and fast) to find the midpoint of the linked list. After reversing the second half, it compares each corresponding node of the first and second halves. Time Complexity: O(n) - where n is the number of elements in the linked list. Space Complexity: O(1) - as it doesn't use extra space proportional to the size of the input. 3. **Approach-3 (Optimized reversing the 2nd half of linked list)**: This approach is similar to Approach-2 but optimized for space. Instead of using an additional list to reverse the second half, it reverses the second half in-place. It also utilizes the two pointers technique to find the midpoint of the linked list. After reversing the second half, it compares each corresponding node of the first and second halves. Time Complexity: O(n) - where n is the number of elements in the linked list. Space Complexity: O(1) - as it doesn't use extra space proportional to the size of the input. 4. **Approach-4 (Using Pure Recursion)**: This approach uses pure recursion to check if a linked list is a palindrome. It employs a helper function (`solve`) recursively to traverse the linked list. The base case checks if the current node is null, returning true if it is. During the recursion, it compares the current node with its corresponding node from the end of the list. Time Complexity: O(n) - where n is the number of elements in the linked list. Space Complexity: O(1) - Auxiliary space, as it doesn't use additional space proportional to the size of the input beyond the call stack. ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗ ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣ ╠╗║╚╝║║╠╗║╚╣║║║║║═╣ ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝ ✨ Timelines✨ 00:00 - Introduction 01:00 - Approach-1 2:41 - Approach-2 11:53 - Approach-3 22:10 - Approach-4 34:24 - Coding all of them #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #newyear2024

Palindrome Linked List (LeetCode 234) | Full solution with trick | Study Algorithms

Reorder List | 3 Approaches | Leetcode 143 | codestorywithMIK

The "Prev Pointer" Trap That Fails Tech Interviews (LeetCode 2095) | Amazon SDE Interview Approach

L10. Check if a LinkedList is Palindrome or Not | Multiple Approaches

Türkei – Paraguay Highlights | Gruppe D, FIFA WM 2026 | sportstudio

Shortest Palindrome | Multiple Ways | KMP Zindabaad | Leetcode 214 | codestorywithMIK

Reverse Nodes in K-Group | Linked List

Lecture 50: Check Palindrome in Linked List || C++ Placement Course

The Strange Math That Predicts (Almost) Anything

Palindrome Linked List - Leetcode 234 - Python

Lecture 81: Linked List LeetCode Problem: Remove Every Kth Node | Rotate List | Palindrome List

Remove Nodes From Linked List | 3 Detailed Approaches | Story | Leetcode 2487 | codestorywithMIK

Generate Parentheses | 2 Approaches | Magic Of Recursion | Recursion Concepts And Questions

Flatten a Doubly Linked List | Leetcode 430 | DSA Series by @shradhaKD

The 5-Step DP Formula That Solves Any Problem !

Merge Two Sorted Lists | DSA Series by @shradhaKD

Quick Sort | Simple Story | Story To Code | Recursion Concepts And Questions | Video 9

Beginner programmer vs "easy" LeetCode questions

