Actually, I was not expecting to understand much from video, but surprisingly it made the concept more clear than any other.
@JaiPrakash-ku7it3 жыл бұрын
This was the third time, trying to understand the KMP in last one year. And finally got it. Thanks man! Great work.
@techdose4u3 жыл бұрын
Welcome :)
@NAVEENKUMAR-uj7xe Жыл бұрын
Same case @jai i dont know why It was so confusing ...🤔
@fraisespasmures9683 Жыл бұрын
Thankksss a lot for this video. I've watched 3 videos trying to understand this algo you're the first one to achieve it with very clear explanations and revelent example. Thanks man
@om23999 Жыл бұрын
Best explanation, I have already watched 3 videos but none of it could give me as much clarification as this video did .
@techdose4u Жыл бұрын
Great :)
@adityasikarwar7090Ай бұрын
I am trying understand the from last 4 hours , I read article at gfg but don't get get whole clarity and also watch many videos on ytube but don't understand complete working, But after watching this video I am completely confident about working of algorithm. Thanks sir ❤
@techdose4uАй бұрын
welcome :)
@anirbanpal94323 жыл бұрын
Best explanation, I'll be honest before watching it I have already watched 3 videos and 2 articles, but none of it could give me as much clarification as this video did. Thanks @Tech Dose
@techdose4u3 жыл бұрын
Welcome :)
@inFamous162 жыл бұрын
Also refer Abdul Bari Sir's channel
@debanjanchakraborty9946 Жыл бұрын
The explanation is best in short time
@techdose4u Жыл бұрын
Thanks :)
@sureshdoodler Жыл бұрын
most underrated channel
@agnivashil4130 Жыл бұрын
still the best explaination found till now....!
@techdose4u Жыл бұрын
Thanks :)
@shivangitiwari24853 ай бұрын
hands down. best video on KMP
@diveshrajput5723 жыл бұрын
Very much helpful rather than other videos
@techdose4u3 жыл бұрын
Thanks :)
@jyotikumari-lp1qh4 жыл бұрын
best video of KMP thank you sir👏
@techdose4u4 жыл бұрын
Welcome :)
@anurag62192 ай бұрын
Trying to get this algo once more in a coding career of 5 years. will comment again whenever i will try again
@techdose4u2 ай бұрын
woww. cool
@Dee_Rai3 жыл бұрын
You are doing a great job. Learning alot from your videos.
@techdose4u3 жыл бұрын
Thanks :)
@devraj-23102 жыл бұрын
I watched 3 videos previously... but this time I got the idea....... thankYou sir...
@katilak18273 жыл бұрын
Mind-Blowing Man, You are just Awesome!
@techdose4u3 жыл бұрын
Thanks :)
@lambar0 Жыл бұрын
love the development of intuition ....that is the key
@nanditmaheshwari13634 ай бұрын
Best video for KMP!!
@sarthakkumar8562 жыл бұрын
As always you have got the best explanation on youtube. Thank you so much for making this subject easy❤
@renon33593 жыл бұрын
You definitely deserve much more likes and subscribers brother. Great content.
@techdose4u3 жыл бұрын
Thanks
@shourabhpayal11983 жыл бұрын
Greatest of all time
@techdose4u3 жыл бұрын
🤗
@kanchidoshi69072 жыл бұрын
Thanks for the video. can you pls explain how would traversal work in case text='aaaaab' and pattern ='aaab'?
@RupamSasmalYt Жыл бұрын
Very easy explanation, Thank u♥
@techdose4u Жыл бұрын
Welcome :)
@rishabhkumar81153 жыл бұрын
thanks for this video...you deserve this...man
@sunwoodad4 жыл бұрын
From the above example, text: "abx abc abc aby", pattern: "abc aby" You said, when 'y' of pattern doesn't match with 'c' at text, we need to move the pattern pointer back until finding 'c', so we can stop at "abc" at pattern and move forward. I think it's wrong. I mean it's okay at above example. But, what if the text is "abx abc dec def", pattern: "abc def" ? When pattern sees 'f' doesn't match to 'c', the pointer of pattern will move back until finding 'c', but "dec" of text and "abc" at pattern doesn't match. And it will eventually determine it found the pattern from the text, but it didn't.
@harsha-kiran4 жыл бұрын
Either use finite state automata or while matching current charcter when moving backwwrd on pattern, check whether the pattern from the start matches too
@ankuradhey4 жыл бұрын
In pattern "abc def" there is no longest suffix which has matching prefix, so pattern search would start from first index of pattern string and it would result into a non match. Watch complete video in which there is a LPS array is created.
@Bakasta1703 жыл бұрын
I am also not getting this even after watching full video
@John831189 ай бұрын
Such an outstanding job! I recently enjoyed a similar book, and it was an absolute masterpiece. "Game Theory and the Pursuit of Algorithmic Fairness" by Jack Frostwell
@WrongDescription Жыл бұрын
Best explanation!!!! Thanks a lot!
@girikgarg83 жыл бұрын
@Tech Dose Can you make a video on Boyer Moore Searching algorithm also? It's there in Love Babbar sheet
@shreyjain515 жыл бұрын
This channel will become big one day!!!
@techdose4u5 жыл бұрын
Thanks shrey :)
@kr_ankit1232 жыл бұрын
Code for the above explanation in C++. Here haystack is text and needle is pattern to be matched. Kindly refer it. class Solution { public: int strStr(string haystack, string needle) { int n = needle.length(); vectorlps(n,0); int i=0; int j=1; while(j0 && needle[j]!=needle[i]) i = lps[i-1]; if(needle[i] == needle[j]) i++; lps[j]= i; j++; } i=0; j=0; // for(auto a:lps)cout
@yashgajewar9019 Жыл бұрын
Great Explanation !!
@abhinavkumar63449 ай бұрын
good explaination, Thank you
@mainakmondal52282 жыл бұрын
Very clear explanation...thanks sir...
@anonymoussloth66873 жыл бұрын
I don't understand one thing. suppose we have a pattern like this: txt: a a a b a (and so on...) pat: a a a b b lps: 0 1 2 0 0 In this case, where there is a mismatch at the last a and b, I understand why pat is started at 0. because there is no prefix that is also a suffix at that point in the pattern. But why is the txt pointer not shifted back?? How can we be sure that if the pattern is just shifted one place to the right (like in the naive/brute force method) that we won't find a match? meaning: a a a b a ... a a a b b I know in this case it is not a match, but how can we be sure that this is the case always? My question basically is, in this algo, we have a i pointer that is iterating through the txt and a j pointer that is iterating through the pat. when there is a mismatch, the j pattern is shifted back a certain amount (which i understand why) but the i pointer is not shifted at all. THIS is what I don't understand. j pointer is shifted based on if there is a prefix that is also a suffix and that makes sense. But i dont understand why the i pointer is not shifted REGARDLESS of whether a prefix is found or not.
@khatrinitish6 ай бұрын
I have same query
@mahipalsingh-yo4jt3 жыл бұрын
Great explanation..!!!!!!!!!
@techdose4u3 жыл бұрын
Thanks :)
@sharanpreetchadha35793 жыл бұрын
Sir , please make video on Boyer Moore algo , there is no good video about it on the net
@techdose4u3 жыл бұрын
Noted :)
@EinstienJr2 ай бұрын
KING!
@neilteng41614 жыл бұрын
Why dont we need to take care of the mode when we subtract the first character and add the last one?
@ghumakkad_yogi4 жыл бұрын
Please make video on kmp search also
@techdose4u4 жыл бұрын
This is KMP search itself. I have just written sublist search. Both are same.
@ghumakkad_yogi4 жыл бұрын
@@techdose4u okkk
@nidhiprakash50843 жыл бұрын
Can u please give the playlist name in the description too?
@techdose4u3 жыл бұрын
Sure I will
@ALEEMKHAWAR12 жыл бұрын
you are just awesome.
@poorbidalal Жыл бұрын
Best One!
@sharuk35453 жыл бұрын
if string abmnbc then Longest PS is 1 but in yout logic its 0
@ayushshukla265511 ай бұрын
also explain with code please !
@JayantiChowdhury-x8u4 ай бұрын
Why we are not moving i back to previous + 1 position?
@RomanEmpire293 жыл бұрын
great explanation thanks a lot
@rankushvishwakarma56584 жыл бұрын
Good job sir!
@techdose4u4 жыл бұрын
Thanks :)
@statusdeveloperss12345 ай бұрын
super bro
@vaalarivan_p Жыл бұрын
3:16 - 5:25
@AniketSomwanshi-ll7mz3 жыл бұрын
Can you tell me how creating the LPS array is O(n) and no quadratic?
@rithikraj18133 жыл бұрын
Why everyone waste 5-10 mins in brute force 🤔🤔
@techdose4u3 жыл бұрын
I shouldn't 😅
@prakhargupta3949 Жыл бұрын
thank you
@akshatchouhan51993 жыл бұрын
Can you please provide java code for this algo
@devmahad20 күн бұрын
thanks :)
@techdose4u20 күн бұрын
welcome :)
@protyaybanerjee50513 жыл бұрын
Which software/hardware do you use to whiteboard ?
@bharatkumar-be9ki4 жыл бұрын
This video is really confusing because you are overwriting everything. Nothing seems making sense. First you should tell the logic and then the algorithm.
@prakashpratapsingh73232 ай бұрын
Great explanation, but I wanna ask whether u were the one in apna college for kmp algorithm. That video has the worst explanation.
@techdose4u2 ай бұрын
Thanks. I am only on Techdose and no other platform.
@satishshingade85143 жыл бұрын
u should take different examples .. everything else was great
@akshatjain68544 жыл бұрын
This is really confusing!
@Bakasta1703 жыл бұрын
shi me yaar ;(
@tanishasethi73633 жыл бұрын
Ikr
@Masarap19595 жыл бұрын
Can you tell its background?
@techdose4u5 жыл бұрын
What background??
@Masarap19595 жыл бұрын
Drawback and application of Sublist?
@spetsnaz_24 жыл бұрын
@@Masarap1959 I think it uses an LPS array, so extra space is used...This is the drawback I see