Перейти к содержимому

Maximum Number of Non-overlapping Palindrome Substrings | 6 Detailed Approach | Leetcode 2472 | MIK

codestorywithMIK

0:00 / 0:00

Maximum Number of Non-overlapping Palindrome Substrings | 6 Detailed Approach | Leetcode 2472 | MIK

8 824 просмотра · 12 часов назад
codestorywithMIK
157 тыс. подписчиков
8 824 просмотра · 12 часов назад
☕ Support codestorywithMIK (No Pressure) Education here is 100% free and always will be. If the content helped you and you'd like to support the channel with a coffee: UPI: imammazhar4@ybl -------------------------------------------------- Whatsapp Community Link : https://www.whatsapp.com/channel/0029... DP Concepts & Qns (DP On Palindromic Strings BluePrint) -    • Palindromic Substrings | Recursion | Memo ...   Hi Everyone, this is the 156th video of our Playlist "Dynamic Programming : Popular Interview Problems" by codestorywithMIK. Today we will be solving a very good problem based on DP : Maximum Number of Non-overlapping Palindrome Substrings | 6 Detailed Approaches | Leetcode 2472 | codestorywithMIK Problem Name : Maximum Number of Non-overlapping Palindrome Substrings | 6 Detailed Approaches | Leetcode 2472 | codestorywithMIK Company Tags : GOOGLE My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie... Leetcode Link : https://leetcode.com/problems/maximum... 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 Segment Tree Concepts Playlist :    • Segment Tree | Introduction | Basics | Bui...   My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And Ques...   Trie Playlist -    • Word Search II | Leetcode 212 | Detailed |...   Difference Array Technique: Concepts & Qns :    • Introduction | What | How | Difference Arr...   My Line Sweep Technique Playlist :    • Introduction | What | Why | Line Sweep Tec...   Meet In The Middle : Concepts & Qns :    • Introduction | Meet In The Middle (MITM) |...   Binary Lifting : Concepts & Questions :    • Introduction | Binary Lifting | DP On Tree...   Top K from Sorted Structures Pattern : Concepts & Questions :    • Introduction | Top K from Sorted Structure...   Small Java Dopamine Videos :    • Small Java Dopamine Videos | codestorywithMIK   My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Intervie... Instagram :   / codestorywithmik   Facebook :   / 100090524295846   Twitter :   / cswithmik   Subscribe to my channel :    / @codestorywithmik   ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗ ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣ ╠╗║╚╝║║╠╗║╚╣║║║║║═╣ ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝ Video Summary : Approach 1 & 2 use a "growing window" (i,j): at each state, either grow the window bigger, slide it forward to a fresh start, or (if it's currently a palindrome) commit it as a piece and jump to a new window right after. Approach 2 just speeds up the palindrome check to O(1) using a precomputed table. Approach 3 & 4 are the bottom-up versions of the same window idea, filling the table from the end of the string backward so every dependency (j+1, i+1, j+k) is ready before it's needed. Approach 5 & 6 flip the perspective entirely: instead of a window growing forward, solve(n)/t[n] asks "what's the best answer for the prefix of length n?" , either skip the last character, or check every possible start i for a palindrome ending there and jump back to t[i]. ✨ Timelines✨ 00:00 Introduction 00:06 Motivation 00:40 Problem Explanation 02:21 Approach-1 16:35 Coding Approach-1 23:53 Approach-2 30:55 Coding Approach-2 34:46 Approach-3 45:37 Coding Approach-3 48:28 Coding Approach-4 49:23 Approach-5 01:01:30 Coding Approach-5 01:05:30 Approach-6 01:09:19 Coding Approach-6 #MIK #mik #Mik #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #easyexplaination #interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #datastructures #algorithms #webdevelopment #softwareengineering #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #helpajobseeker #jobseekers #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik