Longest Palindromic Substring | Recursion Memo | Bottom Up | DP On Strings | Leetcode 5

Sdílet
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

Komentáře • 23

  • @avnish-wf8rv
    @avnish-wf8rv Před 28 dny +3

    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..

    • @codestorywithMIK
      @codestorywithMIK  Před 28 dny +1

      Congratulations and keep it up ❤️❤️❤️🎉🎉🎉

    • @soumyasantamahalik7617
      @soumyasantamahalik7617 Před 8 dny

      bro the the system design round is of LLD or HLD plz do ans

    • @avnish-wf8rv
      @avnish-wf8rv Před 8 dny

      @@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()

  • @chitranshkulshrestha485
    @chitranshkulshrestha485 Před 12 dny +1

    You Really Exaplains Very Well

  • @Imrockonn
    @Imrockonn Před 28 dny +4

    First CZcamsr who posts such good videos without charging any fee❤

  • @krutikadave4534
    @krutikadave4534 Před 28 dny +5

    Thank you codestorywithMIK, there is no indian channel currently that gives detailed background, explanation, different approaches in this manner! It is very helpful.

  • @souravjoshi2293
    @souravjoshi2293 Před 27 dny

    love the content man. learning so much

  • @pratik.784
    @pratik.784 Před 28 dny +3

    sir we want segment tree questions please

  • @ashutoshojha6425
    @ashutoshojha6425 Před 28 dny

    plz cover biweekly and weekly dp problems

  • @tanishchordia4813
    @tanishchordia4813 Před 28 dny +2

    Hey mik thank you for listening to us and completing the series before anything else🫂❤

  • @kishansingh6510
    @kishansingh6510 Před 19 dny

    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

  • @PratikDongare-bh2vs
    @PratikDongare-bh2vs Před 28 dny

    Thanks plz continue this playlist

  • @prajitbanerjee8226
    @prajitbanerjee8226 Před 28 dny

    Bro can you try Manachar's algorithm?

  • @jiteshsingh98
    @jiteshsingh98 Před 28 dny

    Please Complete the ASAP because No quality content For DP 😢

  • @NITian-Priyanshu
    @NITian-Priyanshu Před 28 dny

    sir aaj ke contest ka video bana dijiyega please

  • @dayashankarlakhotia4943
    @dayashankarlakhotia4943 Před 27 dny +1

    class Solution {
    int maxLen=0,lo=0;
    public String longestPalindrome(String s){
    char[]c=s.toCharArray();
    if(s.length()

  • @shubham76
    @shubham76 Před 28 dny

    Bhaiya aj k leetcood contest 404 ka 3rd q nhi ho paya please solution bta do❤

  • @ADK00787
    @ADK00787 Před 28 dny

    Manachar's algorithm for LPS Pls Sir

  • @kushaalrana
    @kushaalrana Před 28 dny

    Ye already uploaded hai na?