Knuth-Morris-Pratt - Pattern Matching

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 20

  • @Shubh22
    @Shubh22 5 лет назад

    I watched many YT videos and still couldn't understand the algorithm. This one has the best graphical explanation. Thanks for the help!

  • @Mussi813
    @Mussi813 7 лет назад +11

    Best f*****g video ever ! You deserve more views than those 200k videos about kmp !

    • @codekits7759
      @codekits7759  7 лет назад +5

      I agree this is likely the best one. Hopefully it's not too hard for struggling students to find because it should clear things right up.

  • @erik9334
    @erik9334 4 года назад +1

    0:15, i sure hope there's no pee to be found in my tea

  • @martindimitrov8547
    @martindimitrov8547 7 лет назад +2

    Finally found a good explanation. Thanks, dude.

  • @rohithravindran3438
    @rohithravindran3438 6 лет назад +1

    Thanks a lot man. It took me a very long time to finally find this perfect explanation. :)

  • @hasikadilshani278
    @hasikadilshani278 5 лет назад

    BEST video ever.....good simple explanation and visualization

  • @FedericoCoppolaIT
    @FedericoCoppolaIT 4 года назад

    Very clear! Thanks so much!

  • @InquiringJoe
    @InquiringJoe 7 лет назад

    Nice video! Small error in line 9 of code at 3:38 , but you stated what's going on correctly :)

    • @codekits7759
      @codekits7759  7 лет назад +1

      Right, it should be "j = j + 1" and not "j + j + 1". I think that the mistake is small enough and obvious enough that the people will understand. Thanks for helping.

  • @ronaldabellano5643
    @ronaldabellano5643 5 лет назад +1

    I couldn’t get how did b became 2 in failure function.

    • @crisis007yt8
      @crisis007yt8 5 лет назад

      Cause two characters are matching....so the prefix and suffix is 'ab'

  • @MichaelKainola
    @MichaelKainola 7 лет назад

    Great, easy to understand explanation of KMP. Thanks!

  • @10000555K
    @10000555K 6 лет назад

    I could be wrong but shouldn't your else if statement be: 'i = i + f(j-1)'?

  • @ronaldabellano5643
    @ronaldabellano5643 5 лет назад +1

    I’m confused. Need to watch this for more times.

  • @rplusgdj
    @rplusgdj 6 лет назад

    What is the complexity of calculating failure function table.

    • @whattehjeff
      @whattehjeff 6 лет назад

      It's O(n). I find this video a better explanation of KMP since it goes over more examples and how to calculation the failure function in depth. ruclips.net/video/GTJr8OvyEVQ/видео.html

  • @fahrankamili7931
    @fahrankamili7931 7 лет назад

    This is very amazing. I thank you so much for this

  • @codekits7759
    @codekits7759  4 года назад

    If you like this teaching style, check out codekits.gumroad.com/l/mariustemplate to learn fullstack web development with React!

  • @kunalbiswas1267
    @kunalbiswas1267 7 лет назад

    thank you!