Knuth-Morris-Pratt(KMP) Pattern Matching(Substring search)

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ต.ค. 2024
  • Pattern matching(substring search) using KMP algorithm
    / tusharroy25
    github.com/mis...
    github.com/mis...

ความคิดเห็น • 1K

  • @shubhamgoyal7596
    @shubhamgoyal7596 9 ปีที่แล้ว +135

    How someone can give such a easy explanation of such a harsh topic...you are awesome sir.

    • @tusharroy2525
      @tusharroy2525  7 ปีที่แล้ว +9

      thx.

    • @aksharmishra9693
      @aksharmishra9693 11 หลายเดือนก่อน +16

      Damm 8y old comment😮
      Bhai abhi aap kya krte ho

  • @aliaksandrsheliutsin2374
    @aliaksandrsheliutsin2374 3 ปีที่แล้ว +8

    I spent 2 hours reading algo book and papers but understand nothing.
    I watched your video 2 times and understand everything.
    Thank you very much!

  • @manasbudam7192
    @manasbudam7192 8 ปีที่แล้ว +37

    I think this is the best introduction any one can get for kmp.It will be better understood if you stress the lps array as an automaton which shows the index from which the comparision must continue.Thank you Tushar sir. Once again I want to say that this is the best introduction any one can get for kmp.

    • @111rhishishranjan2
      @111rhishishranjan2 ปีที่แล้ว +4

      After 7 yrs, what you do now sir??

    • @howhello354
      @howhello354 7 หลายเดือนก่อน

      ​@111rhishishranjan2 after 7 months, what you do now?

  • @allupeng1993
    @allupeng1993 ปีที่แล้ว +2

    thank u , this is the best kmp-algorithm introduction i have never seen, i love your video. now is 2023, but your video is classic and simple for everyone who want to learn kmp truly!

  • @BackToBackSWE
    @BackToBackSWE 5 ปีที่แล้ว +106

    This video is great, really clarifies things.

  • @srnissen_
    @srnissen_ 4 หลายเดือนก่อน +1

    This is the third time I've sat down to look into KMP, but the first time the backwards-prefix-match was explained so I could understand the efficiency of it. Thank you.

  • @d2macster
    @d2macster 8 ปีที่แล้ว +42

    this visualization in 5 minutes explained what took me 2 hours reading other sources

  • @AbhishekSharma20
    @AbhishekSharma20 7 ปีที่แล้ว +1

    I browsed over internet for hours, and still couldn't get such a simple explanation as this. Then I remembered this song: "Jag ghumeya, thare jaisa na koi". Thanks for uploading. You're helping thousands of people.

    • @RamendraSinha
      @RamendraSinha 6 ปีที่แล้ว

      দ্য ঃ ডট t do এত দূর

  • @SanaMalik-ss3sh
    @SanaMalik-ss3sh 8 ปีที่แล้ว +62

    very good work. I have seen a lot of videos about this topic but this is best one through which i have completely unterstand this topic........Thank you sir

  • @sharcodes
    @sharcodes ปีที่แล้ว

    Watching this video on 2023, I can say you are the real gems. You made a video when no was making such good quality content. Thank you 😊.

  • @RudolfEremyan
    @RudolfEremyan 9 ปีที่แล้ว +16

    The Best explanation of KMP in TH-cam))
    12 minutes of helpfull information)))

  • @dampdigits
    @dampdigits 4 หลายเดือนก่อน

    Beautiful explanation. You address the actual logic of finding the longest suffix that is a prefix in a substring, which it easier to understand.

  • @ajinkya5043
    @ajinkya5043 9 ปีที่แล้ว +25

    This was really really helpful...no other video explained KMP algorithm upto this level of clarity...Thanks Tushar Sir!

  • @caesarz7704
    @caesarz7704 5 ปีที่แล้ว

    At first I do not understand what you are talking about, then I went to read blogs and books about KMP, I got even more confused. Then I go back here to watch this video again, finally found your method is the simplest way to achieve KMP. Nice job mate!

  • @lolno6527
    @lolno6527 7 ปีที่แล้ว +34

    Tushar you are doing a superb job buddy!
    I have stopped going to my lectures.
    I got a 46/50 watching your videos on my midterm!
    Thanks mate!
    With love from Canada!

  • @adeypurohit01
    @adeypurohit01 10 หลายเดือนก่อน +1

    The only place on YT where I understood KMP !!
    Thanks a lottt Sir 🙏

  • @bhavukmathur2709
    @bhavukmathur2709 8 ปีที่แล้ว +980

    Can the fees that I innocently paid to my college lecturers be taken back and given to you..??

    • @santuchaitu
      @santuchaitu 8 ปีที่แล้ว +25

      very True. Thank you Tushar for explaining very clearly.

    • @vis40sinha
      @vis40sinha 7 ปีที่แล้ว +20

      mathur ji emotional(bhavuk) kar diye

    • @johnzhang4353
      @johnzhang4353 7 ปีที่แล้ว +9

      i totally agree with you.

    • @shubhamgarg4227
      @shubhamgarg4227 7 ปีที่แล้ว +15

      zyada bhavuk ho liye :P

    • @tusharroy2525
      @tusharroy2525  7 ปีที่แล้ว +367

      I can take the money...:)

  • @shubh13799
    @shubh13799 2 ปีที่แล้ว +2

    old is gold, now this person is working as a technology lead.

  • @plontulublalulu
    @plontulublalulu ปีที่แล้ว +5

    You are consistently the best explainer of these concepts. Thank you a ton

  • @hillstudios1
    @hillstudios1 3 ปีที่แล้ว +1

    One of the best.Tushur is like a saviour who comes helps humanity and never returns back

  • @mubeenullhaq6429
    @mubeenullhaq6429 8 ปีที่แล้ว +7

    Just watched this video 5 hours before the exams .. found it so much easy.. God bless you Sir.
    Respect from Pakistan...:)

  • @AakashPatel25
    @AakashPatel25 8 ปีที่แล้ว +1

    I wasted my entire life trying to understand this algorithm, and you sir explained it to me in first 5 minutes of the video (That too containing introduction and traditional algo to do same)
    Thanks a lot. And hats off dude. Amazing. Hope I could give you million like for this one.

  • @anuveshkothari
    @anuveshkothari 9 ปีที่แล้ว +45

    this video made KMP pattern matching very simple ... all thanks to tushar

  • @Alpha-nn8mn
    @Alpha-nn8mn ปีที่แล้ว +1

    7 years old video, but still one of the best! Thank You Tushar

  • @aditijain515
    @aditijain515 9 ปีที่แล้ว +12

    Wow....This is the best explaination one can ever get on KMP. Thanks alot :)

  • @nataliazolotukhina9469
    @nataliazolotukhina9469 9 ปีที่แล้ว +1

    I've watched lots of videos about KMP but this explanation is the most useful! Thank you!

  • @harpercfc_
    @harpercfc_ 2 ปีที่แล้ว +3

    I promise you this is the BEST KMP algorithm tutorial around the world. Thanks for your video which made me understand KMP finally. Really really awesome!

  • @chaoticmind-z
    @chaoticmind-z 15 วันที่ผ่านมา

    THANK YOU!!! I struggled to understand why you go to the value of where (j - 1) is when a mismatch occurs when setting up the Pi table. You are applying the same comparison logic here when setting up the table that's used when comparing the pattern with another string. The index of where (j - 1) is, is the location of where you should do the next comparison if you get a mismatch. Basically... what you do here is what you do with the KMP algorithm and a string. Finally... I understand thanks to you! God bless.

  • @robertpierce5142
    @robertpierce5142 9 ปีที่แล้ว +4

    The best explanation of the failure table I've found so far. Thanks!

  • @shuyao5248
    @shuyao5248 4 หลายเดือนก่อน

    I couldn't understand this earlier. now I'm very clear about this. Such a awesome explanation. Thankyou very much sir.

  • @ravi-mo6js
    @ravi-mo6js 6 ปีที่แล้ว +6

    Very good and simple explanation bro.. Ofcourse we INDIANS are legends in these cases..

  • @AnkitSharma13
    @AnkitSharma13 9 ปีที่แล้ว +1

    Superb explanation. Wow. Had been to so many other channels to understand but in vain. Thanks Tushar.

  • @monx
    @monx 4 ปีที่แล้ว +3

    The first 5 minutes explaining the intuition is time well spent. Thanks Mr. Roy!

  • @aishy
    @aishy 7 ปีที่แล้ว

    Watched a lecture by Sedgwick on the topic twice, and banged my head with the Deterministic Finite state Automata..
    But, you just have a knack of simplifying complex shit.. Hats off !! Coding really made simple..

  • @balajijayasankar4502
    @balajijayasankar4502 8 ปีที่แล้ว +7

    A very simple and clear explanation to a seemingly complicated algorithm. Glad I found this.

  • @AbhayKumar-oz4oh
    @AbhayKumar-oz4oh 7 ปีที่แล้ว

    you are awesome,after watching this vdo KMP algo is very very very very simple for me
    Hats off to your teaching style sir

  • @celxiusgaming
    @celxiusgaming 7 ปีที่แล้ว +3

    Just had to say that this made understanding a complex algorithm, very simple. Thank you so much for posting this and all the other videos you do!

  • @mayurbhat6564
    @mayurbhat6564 7 ปีที่แล้ว

    Awesome sir I have never ever understood this kmp in my class as best as u taught.... Congo

  • @kakyoism
    @kakyoism 4 ปีที่แล้ว +17

    Great presentation. My first reaction to the algo is "Why must we care about prefix/suffix". I found it difficult to figure out the impact with the first example in the video. Then my take: Say if the input Text was "axax...", the Pattern was "axad...", then the initial matching would fail at the second 'x'. However, then we cannot slide "axa" of Pattern past the second 'x' in Text. We must match Pattern's current prefix, i.e., the 1st 'a', against Text's current suffix, i.e., the 2nd 'a'. This is why we must examine the prefix/suffix situation in the substring before EVERY fail point. Another viewpoint of this problem: Without explicitly backtracking the character at the fail point, we don't know if there could be another occurrence of the fail-point character before the fail point, which could from a sub-pattern of interest. Prefix/Suffix heuristics helps us pinpoint/eliminate the possibility of such an occurrence.

    • @deathbombs
      @deathbombs 2 ปีที่แล้ว

      Sounds really smart

  • @ujjwalrockriser
    @ujjwalrockriser 7 หลายเดือนก่อน

    I saw so many vedios, but this video is god for me. Thank you so much Tushar Sir. Video quality doesn't matter, teaching quality matters.

  • @roh9934
    @roh9934 6 ปีที่แล้ว +7

    I cant thank you enough for your help and contribution in my life learning DS and Algo. You are the Man.

  • @bearli9192
    @bearli9192 6 ปีที่แล้ว +2

    Your video is VERY helpful! I think many TH-camrs can be very good teachers in colleges. Thank you Tushar!

  • @malharjajoo7393
    @malharjajoo7393 7 ปีที่แล้ว +59

    Basically to understand what happens at 9:40 -
    Useful to understand -
    Value stored in the array at index "i" - Length of prefix matched ( from the start , hence we do A[i] = j+1 ) upto that index i.
    "j" index - this is actually the length of the prefix matched from the start. This index keeps on getting reset ( not always to 0 ) .
    "i" index - this is just iterating through every character of the substring.
    1) We increment "i" whenevr there is a mismatch ( A[j] != A[i] )
    and j=0 or if there is a match ( A[j]==A[i] ,in which case j++ is also done )
    2) We "reset" "j" whenever there is a mismatch ( A[i] != A[j] )
    But how do we reset it ?
    Key logic - Go to index j-1. look at A[j -1 ] , this gives prefix length matched upto current "i-1".
    Hence we start checking from A[A[j-1]] against current character at "i".
    To convince yourself of this , think of "j" and "i" moving together when they match characters.

  • @chloeyeocodes
    @chloeyeocodes 2 หลายเดือนก่อน

    Thank you!!! The explanation at 3:24 was so good! It really helps if you watch this video with the pseudocode for the prefix/lps table and the peusodocde for kmp search in front of you 😄 happy coding!

  • @sushants2719
    @sushants2719 6 ปีที่แล้ว +5

    Awesome explanation. I didn't come across any other material that explains KMP as simply as this one.
    Good work, man.. Keep it up .. :)

  • @jdhruwa
    @jdhruwa 8 ปีที่แล้ว

    Great video..
    Simple, sufficient and conceptual..
    I can`t find any better resource than this to learn KMP algo
    Thanx a lot

  • @ghostgutarist5234
    @ghostgutarist5234 5 ปีที่แล้ว +288

    Me: I will learn KMP.
    He: Prefix, Suffix, Suffix, Prefix....
    Me: Damn, I am confused... maybe Some other day.

    • @sunguru981
      @sunguru981 5 ปีที่แล้ว +4

      LMAO .. Same here XD

    • @akashjain7378
      @akashjain7378 5 ปีที่แล้ว +15

      Check out Abdul Bari's video on the same topic. You will surely understand!

    • @gabrieledarrigo310
      @gabrieledarrigo310 5 ปีที่แล้ว

      lol

    • @sarkarsh5537
      @sarkarsh5537 4 ปีที่แล้ว +10

      @@akashjain7378 More like check Abdul Bari's video, and come back and watch this video, because I think both videos are helpful to get a clear understanding of the entire concept.

    • @hagartm
      @hagartm 4 ปีที่แล้ว +2

      Some algos you can tackle in one attempt, the others(?) .... you have to grapple with a bit more. :)

  • @jatinbalani1349
    @jatinbalani1349 10 หลายเดือนก่อน +1

    Very precise explanation. Examples are used and explained simply.

  • @thomasnn
    @thomasnn 8 ปีที่แล้ว +65

    Great video, my book had me all confused about how to fill in the table :)

    • @zheyuanxu1938
      @zheyuanxu1938 6 ปีที่แล้ว

      it's fairly straightforward

    • @blasttrash
      @blasttrash 3 ปีที่แล้ว

      I know its 5 years late but do you remember what book?

  • @jap963852741
    @jap963852741 ปีที่แล้ว

    Awesome, His video is always the easiest to get the core knowledge about the algorithm.

  • @siddharthchabukswar2
    @siddharthchabukswar2 5 ปีที่แล้ว +10

    Hello my name is KMP and today I'm going to talk about Tushar.

  • @leemarchelloopperman372
    @leemarchelloopperman372 9 ปีที่แล้ว

    Great work Tushar, my textbook confused me but this video has given me a better grasp of the kmp algorithm. Thanks alot

  • @mrudul5018
    @mrudul5018 2 ปีที่แล้ว +10

    Why you left video making. I think you were giving far better explanation in 2015 compared to today's videos on TH-cam

  • @chinmayrakshit9872
    @chinmayrakshit9872 9 ปีที่แล้ว +1

    sir your way of teaching is auwsum rest vedios which i used to see seriously telling make me feel sleepy but your way of teaching kind of holds... the reason maybe u filter the vedio but anyhow i saw ur most of vedios it helped me to learn in a simple matter thanks sir... :)

  • @arunvyas27
    @arunvyas27 8 ปีที่แล้ว +11

    Thank you Tushar, I have always tried to escape this algorithm due to its complexity. But with your video i was able to get it in 12:49 mins :) :) Thanks a lot.

    • @saranghae3720
      @saranghae3720 2 ปีที่แล้ว

      @@bulletprooftrading exactly 😂

  • @almamun.
    @almamun. ปีที่แล้ว +1

    Number one explanation all of kmp tutorials in utube.

  • @FrostyBaka
    @FrostyBaka 7 ปีที่แล้ว +3

    Best explanation of KMP algorithm that i found. Thanks

  • @saurabhprasad4499
    @saurabhprasad4499 4 ปีที่แล้ว

    You are a naturally good teacher Tushar

  • @azgddis
    @azgddis 4 ปีที่แล้ว +5

    Search logic first Kmp to understand the complete logic. Excellent explanation with code.

  • @partheshvikassoni8601
    @partheshvikassoni8601 3 ปีที่แล้ว

    Thanks a lot, Tushar! Your videos made such a long time back are being helpful even today.

  • @SUPERRICHKIDS
    @SUPERRICHKIDS 4 ปีที่แล้ว +15

    I can skip this class because of you

  • @HemantKumar-cb2uz
    @HemantKumar-cb2uz 4 ปีที่แล้ว

    For most of the complex algos I try to look up if there is a video by Tushar first , very methodical approach with good explanation and a walkthrough of the example.

  • @sriramv4306
    @sriramv4306 8 ปีที่แล้ว +9

    Excellent! Would be interesting to know the logic behind this algorithm, like how it was formulated.

  • @webv2755
    @webv2755 6 หลายเดือนก่อน +1

    Best video so far I watched for KMP Algorithm, Watching in 2024...

  • @USIndian51
    @USIndian51 7 ปีที่แล้ว +28

    While buliding the array at time 5:59, when character at j=0 and i=1 didn't match,you incremented the value of i but at time 7:3o when character 'd' at poistion j=3 didn't match the character 'a' at position, you didn't increment i but looked into the lookup table of the previous chatacter to get the postion of j. So, the question is when there is a mis match when do increment i and when do you peek into the lookup table of the previou character to get position of ? Do we have to handle special cases at the beginning and also the last character in the pattern? You explanation was excellent except for this one doubt.

    • @indianfootball2328
      @indianfootball2328 5 ปีที่แล้ว +4

      Increment only when there is a match or j=0,
      If there is mismatch lookup at value j-1 and match again

    • @giorgi23
      @giorgi23 3 ปีที่แล้ว +2

      Idea is that when sequential characters don't match you go back and check for the longest prefix that is the same as the suffix you are standing at. If there is no prefix available then you need to go forward and start comparing characters at the beginning of pattern with the string

  • @snehallotus
    @snehallotus 9 ปีที่แล้ว

    Superb explanation of failure function with all the scenarios.. and then the actual string matching algo (y)

  • @souvikdatta97
    @souvikdatta97 6 ปีที่แล้ว +3

    Thanks a lot sir for explaining this so clearly and nicely!

  • @0spidey1
    @0spidey1 5 ปีที่แล้ว

    Thanks a lot man. I was studying from the notes another student took, didn't understand a thing. Downloaded the lecturer's slides, didn't understand a thing. I watched your video for 5 minutes and it all made sense.

  • @saikumarganganapalli5957
    @saikumarganganapalli5957 6 ปีที่แล้ว +6

    At 7:29 Why are we filling the lps in that fashion.? Why should look at prev character's stored value? Nice Video Although

  • @nhutranquynh5766
    @nhutranquynh5766 4 ปีที่แล้ว

    This is the best KMP video i've seen. You explain very clearly that i can understand eventhough English is not my mother tonge. Thank you very much!

  • @siuuuuuMyth
    @siuuuuuMyth 8 ปีที่แล้ว +4

    Thank you sir :)
    This video is really helpful.
    Thanks a lot :)

    • @sayakpaul3152
      @sayakpaul3152 8 ปีที่แล้ว +1

      +Sumit Biswas Totally agreed. Nothing could be better.

    • @siuuuuuMyth
      @siuuuuuMyth 8 ปีที่แล้ว +1

      :)

  • @ppcuser100
    @ppcuser100 6 ปีที่แล้ว +2

    Very visualized clear and quick message. Great! In other teacher's lessons formalism sentences kills the idea.

  • @gotoexplore6874
    @gotoexplore6874 4 ปีที่แล้ว +3

    interesting the sufix-prefix sub algorithm.

  • @MatyyRdk
    @MatyyRdk 6 ปีที่แล้ว +1

    Hands down best videos on algorithms

  • @srishti1613
    @srishti1613 4 ปีที่แล้ว +7

    Who else thinks that this person looks like Gautam Gambhir. Like here
    👇👇

  • @aj9706
    @aj9706 4 ปีที่แล้ว

    Explanation for Prefix array building in this video is the best in TH-cam.

  • @jmares93
    @jmares93 7 ปีที่แล้ว +6

    Tushar you are the man

  • @crazy4hitman755
    @crazy4hitman755 3 ปีที่แล้ว

    From all the other videos on TH-cam, yours are always the best

  • @senthilnathan3834
    @senthilnathan3834 9 ปีที่แล้ว +17

    What if there is no common prefix and suffix in the pattern?

    • @ycjoelin000
      @ycjoelin000 7 ปีที่แล้ว +21

      No, since you can skip the characters that were already compared, in the text to be searched, it's still O(m) on search, no matter what the pattern is. So it's total O(m+n). (I know this is a thread about a year ago, just leaving comment for other viewers.)

  • @babitachaudhary8779
    @babitachaudhary8779 25 วันที่ผ่านมา +1

    Really nice explanation, loved it!!

  • @rikhardu
    @rikhardu 7 ปีที่แล้ว +8

    ~6:10 small MISTAKE:
    You say that if two characters are the same, you increase VALUE of the first one by 1 and put it in the value field of the second one... actually you increase index of the character, not the value of the function (which is seen later, when you analyse second 'b': 7:12). Fortunately in case of the first 'a' index and value of the function are the same, so nothing changes in the table... it's just a bit harder to understand due to this small mistake. Nevertheless thx for the videos, they are very helpful!

    • @Lightyin
      @Lightyin 7 ปีที่แล้ว +2

      He did say value.... but then again he did also point to the index :)

    • @rodrigomolina2055
      @rodrigomolina2055 6 ปีที่แล้ว

      also in the point 7 the value is zero not 1, in the final step at minute 7:51

    • @YogeshDorbala
      @YogeshDorbala 6 ปีที่แล้ว

      sorry but it is 1

    • @joseph1586
      @joseph1586 6 ปีที่แล้ว

      why is 1?

  • @pdmang
    @pdmang 8 ปีที่แล้ว +1

    Hi Tushar, Thank you so much. just landed up here when i was searching for substring search. your explanation is so simple.

  • @user-mo3bk6wv6l
    @user-mo3bk6wv6l 6 ปีที่แล้ว +24

    I had to watch this video 5 times in order to fully understand... should I drop out from computer science ?.....

    • @marcuspolk240
      @marcuspolk240 6 ปีที่แล้ว +25

      No. According to Sedgewick's Algorithms book, this is the trickest algorithm in his book. Apparently when it was first implemented, one of the maintainers couldn't understand it so he replaced it with the brute force implementation.

    • @jerwinsamuel
      @jerwinsamuel 5 ปีที่แล้ว +24

      If you were able to understood it in the end, why does it matter. Congrats 👏

    • @ІванМанчур-е7з
      @ІванМанчур-е7з 5 ปีที่แล้ว +20

      you suck ,I understand it at 4 times.)))

    • @SoyJayP
      @SoyJayP 5 ปีที่แล้ว +1

      No

    • @kabbu643
      @kabbu643 4 ปีที่แล้ว

      Dude he totally confused me

  • @anktrj
    @anktrj 3 ปีที่แล้ว

    after more than 5 years of videos being posted! It still feels new! Anyway thanks for the quality content!

  • @compscilaw
    @compscilaw 5 ปีที่แล้ว +4

    The time complexity to build the next table is O(m) not O(n).

    • @witslost
      @witslost 5 ปีที่แล้ว

      it is Big O (Big O)) actually

    • @compscilaw
      @compscilaw 5 ปีที่แล้ว

      @@witslost You're big square.

    • @witslost
      @witslost 5 ปีที่แล้ว +1

      @@compscilaw no i am Big O(square)

    • @compscilaw
      @compscilaw 5 ปีที่แล้ว

      @@witslost On the internet, no one is supposed to know you're a dog; but your profile picture gives it away. No one is supposed to know that I'm nine squirrels in a human suit.

    • @witslost
      @witslost 5 ปีที่แล้ว

      @@compscilaw no i am nine Big Os in a human suit

  • @vincentt.7146
    @vincentt.7146 2 ปีที่แล้ว

    U made it so easy to understand, disillusioning me to thinking that even i could have come up with this. Amazing, thank you!

  • @MrAvtar1
    @MrAvtar1 8 ปีที่แล้ว +3

    Best explanation seen so far !! Keep doing this great work.

  • @mrudul5018
    @mrudul5018 2 ปีที่แล้ว +1

    I was banging my head here and there for KMP and finally got this video.

  • @boyangdong8927
    @boyangdong8927 8 ปีที่แล้ว +24

    Nice tutorial. But i personally don't like the sound when you erase i/j by your finger, that hurts my ear. Please use a eraser/cloth.

    • @sriniakhilgujulla3892
      @sriniakhilgujulla3892 7 ปีที่แล้ว +2

      lol

    • @smbehindyou
      @smbehindyou 7 ปีที่แล้ว

      hahaha

    • @TM-qc5oz
      @TM-qc5oz 6 ปีที่แล้ว

      You have some serious issues man. Sort them out soon..before you set foot outside ur home..u know people outside make a lot of different sounds..

  • @jvst7728
    @jvst7728 2 ปีที่แล้ว

    can i say why this video is better than other
    it is because he has taken a very good example, which was clearing many doubts

  • @farenew5326
    @farenew5326 8 ปีที่แล้ว +7

    thanks a lot, your explanation is easy to understand, but I think if you could add the source code in your video and then explained it would be better. Anyway ,thanks again :)

  • @utkarshpandey5-yeariddelec863
    @utkarshpandey5-yeariddelec863 ปีที่แล้ว

    This is indeed the best KMP substring search explanation

  • @adigenius04
    @adigenius04 4 ปีที่แล้ว +26

    Anyone studying this in March(or April) 2020 because they have too much free time due to Corona?

    • @alyson4791
      @alyson4791 4 ปีที่แล้ว +2

      I decided to try my hand at making a compiler and this topic came up and my brain is in agony..

    • @Aliennnaa
      @Aliennnaa 4 ปีที่แล้ว +1

      hello fellow learner

    • @arushsaxena9578
      @arushsaxena9578 4 ปีที่แล้ว +2

      th-cam.com/video/t4xUA-aHzy8/w-d-xo.html refer this
      Best video ever, Do watch its prefix part

    • @keshavrathore5228
      @keshavrathore5228 4 ปีที่แล้ว +1

      HI bro; pehchana

    • @sohamgohel1961
      @sohamgohel1961 ปีที่แล้ว +2

      I am watching this in oct 2023

  • @alejandrorodriguezlopez5266
    @alejandrorodriguezlopez5266 3 ปีที่แล้ว +1

    I must admit it took me 3 weeks to get this, but it is not because of you explaining it bad, the technique is actually hard.
    Awesome video.

  • @BharatSingh-zk8lx
    @BharatSingh-zk8lx 8 ปีที่แล้ว +8

    pattern sounds like parrot

  • @sheikhomur4897
    @sheikhomur4897 ปีที่แล้ว

    Thank you very much sir, This is the easiest way to understand the KMP and described it amazedly.

  • @anshaldwivedi9170
    @anshaldwivedi9170 8 ปีที่แล้ว

    Sir you are really genius , u make every thing so easy.

  • @VikramSingh-ud7kj
    @VikramSingh-ud7kj 8 ปีที่แล้ว

    I have been TH-cam user for last 5 years but you know what, this is fist time I'm gonna comment on some video, it's awesome and please keep up the good work (y)

  • @navroze92
    @navroze92 9 ปีที่แล้ว

    Well done with all the videos out there your video was the one where i could understand almost everything

  • @fundekaustubh
    @fundekaustubh ปีที่แล้ว

    Finally understood it perfectly after so many other videos!