This is the best, most complete demonstration I've found for this algorithm. The first example was perfect. I especially like how the professor modified it as a side note to show what should be done when a pattern contains repeated characters.
Sorry to be so offtopic but does someone know a tool to log back into an Instagram account?? I was dumb lost the password. I love any help you can give me
@Lyle Brendan Thanks so much for your reply. I found the site on google and Im trying it out now. Looks like it's gonna take quite some time so I will reply here later when my account password hopefully is recovered.
28k+ views and just one video on the channel, ma'am please make more videos you explain so nicely (itna pyara smjhaya hai aapne 🥺❤) Make more videos and soon you will reach heights!❤ Make videos on more algorithms like this!❤
this is not boyer-moore algorithm, The algorithm you have explained is horspool algorithm which is a simplified version of the boyer-moore algorithm. Please change the title of the video to horspool if you see this.
Ma'am your should make more vidoes, your explanation is so good, The one and only video on youtube which explain Boyer Moore pattern Matching algorithm so nice and easy way, Tnq so much ma'am.........................................................................................
The shaky camera and flickering light annoyed me and got dizzy. Make a video with a camera stand and good light. Your teaching method is amazing and easy to understand. Thank you.
5:09 if u add a imaginary char 's' to the pattern then the length will be 7 for the pattern and hence (in the imaginary situation) the value for the second 'a' is 1 not 0
Very nice explanation and please increase your voice a little bit in middle of the video and please upload more videos on all topics ,you are the best teacher
Great explanation. However, one thing I want to point out about the shift at 13:17 When we found a mismatch at index 5 between M (in T) and G (in P), we don't want to shift the entire pattern. Imagine we're comparing the following i: 0 1 2 3 4 5 6 7 T: W E L C O M E O L L E G E P: E O L L E G E If we followed the logic in the video, when we find the mismatch between M (in T) and G in (P), our loops exit and return a 'P is not in T' answer because we head straight to index 7 when we should be on index 6 . What we should do is, move our index to mismatchIndex + 1. In my example, mismatchIndex is 5 so our comparison starts from index 6 which will be between the first element of P and the 6th element of T.
It is because of the calculation of the bad match table, specifically the value for the last character in the pattern. In the video she says the value for the last character should always be the length of the pattern, so in the case for E0LLEGE, E in the bad match table is 7. But the value of the last character should only be equal to the length of the pattern if it had not been defined before. And From the pattern E has already been defined at index 0 and index 4, Hence the final value for E in the bad match table should be E=7-4-1=2 The bad match table would look like. E O L G * 2 5 3 1 7 That is from my understanding, correct me if am wrong.
@bharathi Ramesh your explanation for Boyer Moore Pattern Matching algorithm is not working for this example, txt = ababdabacdababcabab pat = ababcabab
I believe it is because of the calculation of the bad match table, specifically the value of the last character, in the bad match table, the value of the last character should be equal to the length of the pattern if it had not already been defined, as seen in your pattern b has already been defined so instead of b=9, b=2. After calculating the bad match table it should be a b c * 1 2 4 9