Longest Palindromic Substring | Recursion Memo | Bottom Up | DP On Strings | Leetcode 5
Vložit
- čas přidán 27. 07. 2024
- iPad PDF NOTES - github.com/MAZHARMIK/Intervie...
Whatsapp Community Link : www.whatsapp.com/channel/0029...
This is the 24th Video of our Playlist "DP Concepts & Qns" by codestorywithMIK
This is the Sixth video of the "DP On Strings" series in this playlist.
In this video we will try to solve a good DP on strings problem : Longest Palindromic Substring | Recursion | Memo | Bottom Up | DP On Strings | Leetcode 5 | DP Concepts & Qns-24
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 : Longest Palindromic Substring | Recursion | Memo | Bottom Up | DP On Strings | Leetcode 5 | DP Concepts & Qns-24 | codestorywithMIK
Company Tags : Amazon, Microsoft, Bloomberg, Uber
My solutions on Github(C++ & JAVA) : github.com/MAZHARMIK/Intervie...
Leetcode Link : leetcode.com/problems/longest...
My DP Concepts Playlist : • Roadmap for DP | How t...
My Graph Concepts Playlist : • Graph Concepts & Qns -...
My Segment Tree Concepts Playlist : • Segment Tree | Introdu...
My Recursion Concepts Playlist : • Introduction | Recursi...
My GitHub Repo for interview preparation : github.com/MAZHARMIK/Intervie...
Instagram : / codestorywithmik
Facebook : / 100090524295846
Twitter : / cswithmik
Subscribe to my channel : / @codestorywithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Approaches Summary :
Approach 1 - Recursion + Memoization
Memoization will help reduce time complexity for cases like - "aaaaaaaaa"
T.C : O(n^2) - Because the AMortized Time Complexity of solve() will become 1 due to memoization.
S.C : O(n^2)
Approach 2 - Using Bottom Up (Elaborated for simplicity) - My favourite BluePrint for solving palindromic DP problems
T.C : O(n^2)
S.C : O(n^2)
✨ Timelines✨
00:00 - Introduction
2:34 - Recursion + Memoization
19:54 - Coding Recursion + Memoization
24:05 - Bottom Up (Blue Print)
42:29 - Coding Bottom Up (Blue Print)
#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
Sir i am following your for long time..and started being consistent from last 1 yaer in DSA....following your videos.....just to let you know i recently got an offer from 1 USA based Retail Product Based company...with CTC of 18+LPA with 1.8 YOE....i solved 5 DSA question and 1 system design question in 3 rounds of interview...thank you from bottom of my heart...you have changed my life for good❤... I Promise i will still continue to be consistent..
Congratulations and keep it up ❤️❤️❤️🎉🎉🎉
bro the the system design round is of LLD or HLD plz do ans
@@soumyasantamahalik7617 it was both..not too much details just overview...he just asked what classes will be there and what...methods will be there...he made me write 2 methods only..addVehicle()...removeVehicle()
You Really Exaplains Very Well
First CZcamsr who posts such good videos without charging any fee❤
Thank you codestorywithMIK, there is no indian channel currently that gives detailed background, explanation, different approaches in this manner! It is very helpful.
agree
love the content man. learning so much
sir we want segment tree questions please
plz cover biweekly and weekly dp problems
Hey mik thank you for listening to us and completing the series before anything else🫂❤
bhaiya please solve longest common substring
in that problem we have to call recursive call for each pair for i,j in the dp matrix which is hard to grab
Thanks plz continue this playlist
Bro can you try Manachar's algorithm?
Please Complete the ASAP because No quality content For DP 😢
sir aaj ke contest ka video bana dijiyega please
class Solution {
int maxLen=0,lo=0;
public String longestPalindrome(String s){
char[]c=s.toCharArray();
if(s.length()
Bhaiya aj k leetcood contest 404 ka 3rd q nhi ho paya please solution bta do❤
Manachar's algorithm for LPS Pls Sir
Ye already uploaded hai na?
This one has one more approach - Using blueprint
@@codestorywithMIK bhaiyaa eagerly waiting for your partition dp concept