Regular Expression Matching Dynamic Programming | Leetcode Hard Solutions

Поділитися
Вставка
  • Опубліковано 26 сер 2024
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this problem, we discuss the Regex Matching problem using dynamic programming. In this problem,
    1. You are given two strings S1 and S2. S1 represents a text and S2 represents a pattern.
    2. You have to print 'true' if the pattern is matched with the given text, otherwise print 'false'.
    The pattern can include the characters '.' and '*'
    '.' - matches any single character
    '*' - matches zero or more of the preceding character
    To attempt and submit this problem, click here: www.pepcoding....
    For a better experience and more exercises, VISIT: www.pepcoding....
    #dynamicprogramming #leetcode
    Have a look at our result: www.pepcoding....
    Follow us on our FB page: / pepcoding
    Follow us on Instagram: / pepcoding
    Follow us on LinkedIn: / pepcoding-education

КОМЕНТАРІ • 220

  • @shubhamyadav388
    @shubhamyadav388 3 роки тому +84

    The amount of effort that has been put in this video is commendable.

  • @NikhilSharma-xv6gx
    @NikhilSharma-xv6gx 3 роки тому +28

    Apart from the great teaching skills and question set,
    I really enjoy those spontaneous songs 😁

  • @arnabchatterjee7651
    @arnabchatterjee7651 3 роки тому +5

    having a teacher like you can change the destiny of a student, what you are doing is restoring my faith in humanity, take a bow sir, being there for 10 years in the industry, i can guarantee content like this wont be available in most paid courses and highly rated books

  • @poorvajain97
    @poorvajain97 3 роки тому +27

    WHAT AN AMAZINGG VIDEO SIR! What an amazing series! Aap Gyaan ka Bhandaar hain SiR

  • @anusatyachoudhary7382
    @anusatyachoudhary7382 3 роки тому +16

    Another masterpiece. Yesterday watched the wildcat matching, today regex. Again excellent video, building the concept from zero. Taking time to explain where necessary. Thank you.

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms ) or you can upvote the comments written by the students about Pepcoding.
      Keep learning and keep loving Pepcoding😊

    • @sundaran9625
      @sundaran9625 Рік тому +1

      it's wildcard not wildcat

  • @creativegiant148
    @creativegiant148 3 роки тому +17

    When u enjoy teaching this happens what a explanation sir!!!

    • @Pepcoding
      @Pepcoding  3 роки тому +3

      Glad to hear that, keep watching and keep loving Pepcoding😊

  • @nknidhi321
    @nknidhi321 2 роки тому +1

    Sumeet sir, kya bolu, bs bawal ho aap !! Thanks for this mind-boggling content.

  • @lkbhitesh07
    @lkbhitesh07 2 роки тому +1

    The song, in the end, was OP. Ye chhote choote moments fan bana dete h aapke.
    Explanation to OP always h.

    • @Pepcoding
      @Pepcoding  2 роки тому

      Keep learning and supporting.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @yuvraj2038
    @yuvraj2038 3 роки тому +1

    BEST TEACHER. HE TAKES SO MUCH TIME TO EXPLAIN THINGS SO THAT IT BECOMES CRYSTAL CLEAR. I HOPE I CAN ALSO SOLVE SUCH HARD PROBLEMMS ON MY OWN

  • @deepakkapasia1
    @deepakkapasia1 Рік тому

    Bhaisaab aise teachers ho agar to har banda FAANG phod de.... Great sumeet sir ji

  • @anonymous090
    @anonymous090 Рік тому

    finallyy I understood why everyone is doing i-2 or j-2. Thanks a lot.

  • @harpic949
    @harpic949 2 роки тому +1

    Bhaisab...for past 2 hours I was trying this problem and didn't get it...but you stablised the concept perfectly🔥🔥
    Gonna recommend you to every junior

  • @sayakbanerjee7214
    @sayakbanerjee7214 3 роки тому +6

    The effort you put in to help us understand each cell is really appreciable sir 👍

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thanks a lot and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @shubhamraj25
    @shubhamraj25 Рік тому

    Question was so exhaustive, bhaiya turned into a singer at the end!

  • @SunnyGuptaTech
    @SunnyGuptaTech Рік тому +1

    Awesome explanation. Teaching is a joy. The way you are enjoying your job is incredible. Hats off to you.

  • @pankhurisingh6199
    @pankhurisingh6199 Рік тому

    Blessed to have such teacher

  • @kartikeydixit3743
    @kartikeydixit3743 3 роки тому +3

    Your Hardwork and effoerts in explaining every details of solutions is great , thankyou sir.

    • @Pepcoding
      @Pepcoding  3 роки тому

      So nice of you and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @Impromptu21
    @Impromptu21 3 роки тому +5

    34:57 was the movement i loved bcoz i got clicked and u too was waiting for it.Lit sir 🥰🥰🥰

    • @Pepcoding
      @Pepcoding  3 роки тому +3

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

    • @aakashyadav6228
      @aakashyadav6228 3 роки тому

      moment*

  • @shantanukumar4081
    @shantanukumar4081 2 роки тому +1

    Great Explanation !!!

  • @adarshkumar-ys9tp
    @adarshkumar-ys9tp 3 роки тому +3

    dhanyavad sir, solving problem is intresting, you showed and reminded me that, and those classic tracks, amazing

  • @kevalshah39
    @kevalshah39 3 роки тому

    Bhai matlab maza aa gaya. Aisi mauj me padhne milta to papa kasam straight A student hota.
    This explanation helped me pave my way through DP!
    Love from New York❤

    • @Pepcoding
      @Pepcoding  3 роки тому +3

      I am glad. Keep learning. Keep supporting. Your kind words are the kind of motivation that truly help me in making more and more content. Especially, these days, not everybody is generous with motivating anybody either. It means a lot

  • @AmitKumar-gm8wl
    @AmitKumar-gm8wl 3 роки тому

    Thanks Yaar. Aapne bahut ache se explain kiya h. Ye prob mujhe bahut tough lagta tha. but aapne to ise easy me convert kar diya. Thaks a lot for detail explanation.

  • @sakshamsinghal5127
    @sakshamsinghal5127 3 роки тому

    No one can teach better than this. Really u r great.

  • @gouravsingh9509
    @gouravsingh9509 3 роки тому

    1 or more character matching with * is the most important part of this solution and this video helped me to understand property.

  • @legend1.036
    @legend1.036 8 місяців тому +1

    Explanation is Very nice

  • @rohangaonkar8912
    @rohangaonkar8912 2 роки тому

    "dusri baar bina diye mar gaya" awesome explanation!!

  • @factswithai2
    @factswithai2 3 роки тому

    Jo insaan leetcode ke hard ko easy se bhi easy banade wo sumeet sir. Isliye sumeet sir is the best

    • @Pepcoding
      @Pepcoding  3 роки тому

      wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit.

  • @SonuKhan-mp2yn
    @SonuKhan-mp2yn 8 місяців тому

    No words to appreciate just Thank you

  • @abhineetsingh6720
    @abhineetsingh6720 2 роки тому

    iss wale video ke efforts ke like like to banta hai boss😊

  • @ASHWARYARATHORERA
    @ASHWARYARATHORERA 3 роки тому

    This channel must be on top of youtube programming videos

  • @manpreetsinghrana7751
    @manpreetsinghrana7751 Рік тому

    Sir, you are a legend!!! This can't be explained in any easier way.

  • @nitunsingh6986
    @nitunsingh6986 2 роки тому

    Legend Of Programming💥💥. Hidden Talent of singing too

  • @sanikaravindradeshmukh7511
    @sanikaravindradeshmukh7511 Рік тому

    Excellent video - Great Humanity

  • @devangijoshi9596
    @devangijoshi9596 Рік тому

    Great Sir. And your singing also.

  • @bk8888
    @bk8888 3 роки тому +2

    SHouldn't the loops run till lengths of the dimensions of the array?
    for(int i = 0; i

  • @rohitshinde8478
    @rohitshinde8478 3 роки тому

    You can make any question look very easy . You are really awesome teacher . Thank you very much for your efforts

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )

  • @adityaojha2701
    @adityaojha2701 3 роки тому +1

    Great explanation + lovely ending with song!!

  • @CodeSuccessChronicle
    @CodeSuccessChronicle 2 роки тому

    Bhai thank you for all your efforts… I wish your channel get more subscribers…..

    • @Pepcoding
      @Pepcoding  2 роки тому +1

      Glad you liked it!
      Keep learning and supporting us.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

    • @CodeSuccessChronicle
      @CodeSuccessChronicle 2 роки тому

      @@Pepcoding okay bhaiyya

  • @ShubhamSahu-fe8ed
    @ShubhamSahu-fe8ed 2 роки тому

    best explaination sumeet sir

  • @shubhadamali9907
    @shubhadamali9907 Рік тому

    very well explained. great👍

  • @techykush7192
    @techykush7192 3 роки тому +1

    shandar jabarjast jindabaaad sir jii😍😍😍😅 finally i fully able to understand the solution tysm sir jiii

    • @Pepcoding
      @Pepcoding  3 роки тому

      Beta, khushi ko thora control kro aur agr questions banne lge to ghamand nh krna aur agr naa ho to haar nh maan ni.
      Aur aise h apna pyaar bnaye rkhe aur pdte rhe😊

    • @techykush7192
      @techykush7192 3 роки тому

      @@Pepcoding haa sir jiii

    • @amitbajpai6265
      @amitbajpai6265 3 роки тому

      @@Pepcoding sir dil jeet liya aur ye ghamand waali baat mere sath kyi baar hui hai akasr mai question karke sochne lagta hu ki ab to ho jayega lakin fir atak jata hu aur focus kho baithta hu......

  • @maverickreal09
    @maverickreal09 3 роки тому +1

    Why do we mark true an element in 1st column depending on the element 2 rows above ? What's the behavior of *?

  • @AbhishekTiwari-uj7nj
    @AbhishekTiwari-uj7nj 2 роки тому +1

    I have become your fan....

  • @pcvermatipstricks472
    @pcvermatipstricks472 2 роки тому +1

    Thank you so much sir for so much efforts.
    You are best 👍👍💛💐

  • @nagendranp3961
    @nagendranp3961 3 роки тому

    very easy to understand you explanation sir. one small request communication is english every country people can easy to understand.

  • @bhargavsriram4737
    @bhargavsriram4737 3 роки тому +3

    wow, this is AMAZING sir, THANK YOU VERY MUCH.

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )

  • @sumitpurohit19
    @sumitpurohit19 2 роки тому

    The best explanation !!

  • @amitguptapc
    @amitguptapc 3 роки тому

    Hats off for your efforts and awesome explanation. I always feared DP but now I think your videos are going to make me a master in DP.

    • @Pepcoding
      @Pepcoding  3 роки тому +5

      I am glad. Keep learning. Keep supporting. Your kind words are the kind of motivation that truly help me in making more and more content. Especially, these days, not everybody is generous with motivating anybody either. It means a lot or Beta, khushi ko thora control kro aur agr questions banne lge to ghamand nh krna aur agr naa ho to haar nh maan ni.
      Aur aise h apna pyaar bnaye rkhe aur pdte rhe😊

    • @amitguptapc
      @amitguptapc 3 роки тому +2

      @@Pepcoding Nhi sir ghamand nhi karunga. I am really enjoying it. Your DP videos are really addictive. Main wildcard matching padhne aaya tha. Lekin apne itna sahi samjhaya ki ab apki DP ki puri series dekh raha hu. Keep making such videos. It really helps competitive programmers like us.

  • @ramkumarsingh8651
    @ramkumarsingh8651 2 роки тому +1

    best explaination for this question on youtube

    • @Pepcoding
      @Pepcoding  2 роки тому

      Please check more of my content on nados.pepcoding.com

  • @shivangagrawal2923
    @shivangagrawal2923 2 роки тому

    Thank you for your amazing and logically explanation, The amount of effort you put into that explanation is really appreciable

  • @divyanshagarwal5374
    @divyanshagarwal5374 3 роки тому

    The way sir explains is out of this world😍.Thanku so much sir.

  • @vikaschaudhary7465
    @vikaschaudhary7465 Рік тому

    Excellent effort !!

  • @aindrilasaha1592
    @aindrilasaha1592 3 роки тому

    What an explanation, thanks a lot for your effort Sir!! I wonder how those 3 people gave dislike on this video!!

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      No worries! keep motivating and Keep loving😊 Beta

  • @bk8888
    @bk8888 3 роки тому

    Awesome explanation. And you truly seem to enjoy producing this content. Cheers!

  • @rajnishraj493
    @rajnishraj493 3 роки тому

    Salute to your way of teaching sir

  • @ROHITKADYANJI
    @ROHITKADYANJI 2 роки тому

    What a patience level sir great explanation 🔥🔥🔥🔥

  • @AbhishekKumar-yv6ih
    @AbhishekKumar-yv6ih 4 роки тому +1

    kya gaate hn sir aap!! Dil khush.
    I got why.

  • @noobCoder26
    @noobCoder26 3 роки тому

    Thank u sir Learning the Dp from your lessons . Thanks for ur efforts

  • @faizm4765
    @faizm4765 3 роки тому

    Mind blowing 🔥🔥 Salute to your effort and patience bhaiya!

  • @akshatgupta2916
    @akshatgupta2916 2 роки тому

    Sir prefer teaching a dp problem from a recursive approach as the table approach is more abt mugging up the sol and not understanding the problem.

  • @karanveersingh5535
    @karanveersingh5535 2 роки тому

    Kya Baat kya baat kya baat 🔥

  • @ekanshsaxena4538
    @ekanshsaxena4538 2 роки тому

    You make DP easy to understand, Thanks a lot sir.😍

  • @user-pr9zl4mz2e
    @user-pr9zl4mz2e Рік тому

    Great video sir

  • @hritikagrahari8314
    @hritikagrahari8314 3 роки тому

    Salute sir, mja aa gya.

  • @ashwinvarma9349
    @ashwinvarma9349 2 роки тому +1

    i think ur solution fails on "aa and a*" on leetcode, please check

  • @juzarantri864
    @juzarantri864 2 роки тому +1

    how can he think too deep? Because as my my view I cannot imagine to see two rows above if * is there in first column

  • @tipums123
    @tipums123 2 роки тому

    Very good and details explanation. You are the best!!

  • @KomalKumari-fk5ng
    @KomalKumari-fk5ng 2 роки тому

    Hats off !!! 👏 how do u urself come up with such clear concept ...... genius 👍

    • @Pepcoding
      @Pepcoding  2 роки тому

      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @abhishekbabuji6099
    @abhishekbabuji6099 2 місяці тому

    The explanation that you give at 26:01 that is used in timestamp 36:19 is a patented explanation. No channel that I know of has covered this.

  • @shreyashachoudhary480
    @shreyashachoudhary480 2 роки тому

    Really appreciate your efforts sir, amazing content! Thanks.

  • @aman6561
    @aman6561 3 роки тому

    bdhia Sr asli mzaa to Why me hi tha kadak ekdm.

  • @satyamsharma8718
    @satyamsharma8718 4 роки тому +1

    Wahhh
    Kya aavaj hai aapka sir.. 🔥🔥

  • @anmolgirdhar4473
    @anmolgirdhar4473 3 роки тому

    Best person top learn DSA from

  • @aditya5026
    @aditya5026 2 роки тому

    Excellent explanation. Thank you.

  • @senspture
    @senspture 3 роки тому +1

    Thank you so much for this masterpiece!! ❤️❤️

  • @harshvardhanyadav8949
    @harshvardhanyadav8949 2 роки тому

    Superb explanation Sir, thanks a lot.

  • @rahulshah6571
    @rahulshah6571 2 роки тому

    Awesome brother. More power to you.

  • @pallavisingh-jm4bj
    @pallavisingh-jm4bj 3 роки тому +1

    Awesome explanation! Really amazing

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      Thankyou beta!
      keep watching and keep learning😊

  • @aviralgupta8860
    @aviralgupta8860 3 роки тому

    Very nice explanation, felt like real classes.👏

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @034_sonalmishra9
    @034_sonalmishra9 3 роки тому

    thanks a lot sir for such an outstanding explanation

  • @anshulgupta1426
    @anshulgupta1426 2 роки тому

    Very well explained.👏

  • @kartikeyamishra3325
    @kartikeyamishra3325 3 роки тому

    much better video than Tushar Roy.......you have explained it very well

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou buddy!😋
      Keep leraning and keep supporting Pepcoding!😍🥰

  • @adityaagrawal7260
    @adityaagrawal7260 3 роки тому

    The way you explain is pretty awesome

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms ) or you can upvote the comments written by the students about Pepcoding.
      Keep learning and keep loving Pepcoding😊

  • @rajshah9129
    @rajshah9129 2 роки тому

    In wild card we are moving from bottom to top and here top to bottom how to decide that or we can do in both way?

  • @HimanshuSingh-zu4ht
    @HimanshuSingh-zu4ht 2 роки тому +2

    your answer is wrong for this testcase
    "mississippi"
    "mis*is*p*."

  • @AnkitKhandelwal335
    @AnkitKhandelwal335 3 роки тому

    This the best explanation, thank you!!!

  • @heenamittal8621
    @heenamittal8621 3 роки тому

    Amazing explaination. Thank you sir :)

  • @GauravKumar-ue7nz
    @GauravKumar-ue7nz 2 роки тому

    Thank you Sir

  • @princeranjan7206
    @princeranjan7206 3 роки тому +1

    amazing explanation sir , loved it i was using c++ so was not considering your videos but from now onwards.
    its always been you sir - rachel green

  • @OSHINMAINI
    @OSHINMAINI 3 роки тому

    You a good singer!! entertainment while studying :)

    • @Pepcoding
      @Pepcoding  3 роки тому

      Keep learning, Keep growing and keep loving Pepcoding!😊

  • @techinfo1669
    @techinfo1669 3 роки тому

    You just made DP easier for me

  • @shreyanshsharma8909
    @shreyanshsharma8909 3 роки тому

    What an awesome video. Sir, I deeply request you to make videos on bitmasks and bit manipulation please. Just like dp, can you make a playlist on them?

    • @Pepcoding
      @Pepcoding  3 роки тому

      There is already a playlist of 30 questions in bit manipulation. Visit the aite and check out level2.

  • @manishkumarsingh4631
    @manishkumarsingh4631 2 роки тому

    37/79 Done

  • @ekjotnanda6832
    @ekjotnanda6832 3 роки тому

    Really really Good 👍🏻👍🏻👍🏻

  • @sahilanower9189
    @sahilanower9189 2 роки тому

    Gem of a video this!

  • @vivekkumar-vx5jh
    @vivekkumar-vx5jh 2 роки тому

    Amazing Explanation sir thankyou so much.

    • @Pepcoding
      @Pepcoding  2 роки тому

      Glad you liked it!
      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @tejasnakhate7751
    @tejasnakhate7751 2 роки тому +1

    In wildcard matching we considered null strings and pattern as last row and column. But, here, we are considering that as first row and column. How to decide this?

    • @Pepcoding
      @Pepcoding  2 роки тому

      For doubt support, do checkout same content on nados.pepcoding.com

  • @amanpreetsinghsetia1524
    @amanpreetsinghsetia1524 3 роки тому

    amazing explanation

  • @crackdatastructurealgorith1650

    Gana acha gaate ho. maja aa gaya... aapne ek video mein gaana gaya hai "Kiska rasta dekhe ae dil ae saudai" vo kaun sa video hai? mujhe mil nahi raha hai.. maine dekha tha I guess longest palindromic substring mein. aapko yaad hai to link share ker deijiye.

  • @ayushbisht2689
    @ayushbisht2689 3 роки тому

    Thanks for your efforts and specially for the song as well :)

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thank you so much and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )