Rabin-Karp algorithm - Inside code
24:20
Пікірлер
@adoq
@adoq 17 сағат бұрын
this video is amazing
@DasAntiNaziBroetchen
@DasAntiNaziBroetchen Күн бұрын
Can you suggest a similar algorithm that is more GPU friendly? I don't think I can span a fixed size grid across my scene, because the scene is too big.
@sharjeel_mazhar
@sharjeel_mazhar Күн бұрын
That's IN SHA ALLAH really made me happy, to see a Muslim man making these great videos with easy and visual explanations! 🔥 Kudos to you 💯 keep doing the hard work, you will reach 1M some day IN SHA ALLAH!
@ESLRepeat
@ESLRepeat 2 күн бұрын
thanks man, you explained the thing really well. I had fun taking the class
@baitongli6366
@baitongli6366 2 күн бұрын
The linear time solution isn't truly same as the first two because the last element in the array is always moved away. However, it should have a small chance to stay in its original position in the final result. I think we should add an additional swap to fix this.
@nyanhtetaung78
@nyanhtetaung78 4 күн бұрын
very clear after watching this.
@Kyoz
@Kyoz 6 күн бұрын
🤍
@fredericoamigo
@fredericoamigo 7 күн бұрын
This video is one of the best I've seen on the topic. Simply brilliant! Keep up the good work!
@vanshikapatidar8537
@vanshikapatidar8537 9 күн бұрын
Perfect explanation
@trungkstn
@trungkstn 9 күн бұрын
How about case y1 = y2
@arianna6809
@arianna6809 10 күн бұрын
@7:03 isn't it like this? slow traverses c3l+z and fast traverses x?
@sarthaksharma9322
@sarthaksharma9322 10 күн бұрын
Beautiful visualisation! and explanation of time complexities and algorithm, love the video so much!!❤
@Cristian-in8or
@Cristian-in8or 11 күн бұрын
at 4:21, maybe something is wrong with the formula? There are two ">"?
@naughtybuddha3942
@naughtybuddha3942 12 күн бұрын
cast a ray to "any" direction? I can easily make a point outside to cast a ray crossing the polygon 3 times!
@chanukachathurangawk
@chanukachathurangawk 13 күн бұрын
Thanks a lot.
@SorestCode
@SorestCode 14 күн бұрын
i want to ask how did you do the graphic effects and all stuff in the video which tools did you use? thanks!
@Antagon666
@Antagon666 15 күн бұрын
Shouldn't you start with right cell search to optimize memory access though ?
@coolkids9791
@coolkids9791 17 күн бұрын
😅
@nullptr.
@nullptr. 18 күн бұрын
Thanks
@JamesSarantidis
@JamesSarantidis 19 күн бұрын
Awesome. I watch searching for an explanation on ray casting and yours was perfect. Now, I have a different problem to solve. I want to generate the shape of a city starting from a rectangle and want to morph semi-randomly in a way that it contains some Point of Interest (POI) while it excludes Points of Avoidance (POA). Any Idea as to how to do this smartly; without checking each time if every single deformation left some POI out or let some POA in?
@isaacwhiz
@isaacwhiz 21 күн бұрын
I have come up with a solution but it seems like brute force, and if so, someone help me optimize it: static int maxVowelsNum(String s, int k) { var list = List.of('a', 'e', 'i', 'o', 'u'); var p1 = 0; var p2 = k + 1; var max = 0; var count = 0; while (p2 < s.length()) { var chars = s.substring(p1, p2); for (var ch : chars.toCharArray()) { if (list.contains(ch)) { count++; } } max = Math.max(max, count); p1++; p2++; count = 0; } return max; } Thank you.
@Thahira-yc2ys
@Thahira-yc2ys 21 күн бұрын
Hi, why cant we take d/2 from both side of mid line?
@AndyWallWasWeak
@AndyWallWasWeak 22 күн бұрын
is there a way to modify this to get all pairs starting from the one of the 2 closest points and ending with the pair of the two furthest apart, i.e. get all pairs sorted by distance
@user-vi5mg1nn2o
@user-vi5mg1nn2o 23 күн бұрын
Do in C++ too please !!
@suri4Musiq
@suri4Musiq 27 күн бұрын
Isn't this just post-order DFS?
@pk-ql6qu
@pk-ql6qu 27 күн бұрын
these animations are bomb! Great job!
@user-vi5mg1nn2o
@user-vi5mg1nn2o 28 күн бұрын
Do in C++ too
@adityaram700
@adityaram700 28 күн бұрын
I am confused, in Knapsack code, we did not use knapsack(values, weights, k), (we are not skipping the current value and moving on to i+1 right), what am I missing here? Could you tell me the intuition?
@mokochan4129
@mokochan4129 Ай бұрын
Thanks for the video! In 4:56 you say, that there is no alternating path ending in B4, but there is one between a4 and b4, isn't that so?
@lucasdiehl7384
@lucasdiehl7384 Ай бұрын
last example is useless other than in this toy example, almost never values translate to indices in a array(in bound).
@lexkoal8657
@lexkoal8657 Ай бұрын
Sorry, but using x as a constant just doesn't feel okay 13:20
@chaos.n.dissonance
@chaos.n.dissonance Ай бұрын
Thank you. I've been struggling to wrap my mind around ChatGPT's explanation of sliding window technique for a few days now, this is so much simpler. def count_vowels_efficientcode(word:str, k:int) -> int: VOWELS = set('aeiou') max_vowels:int = 0 n:int = len(word) if n <= k: for c in word: max_vowels += c in VOWELS return max_vowels for c in word[:k]: max_vowels += c in VOWELS cur_vowels:int = max_vowels for i in range(k,n): cur_vowels -= word[i-k] in VOWELS cur_vowels += word[i] in VOWELS max_vowels = max(max_vowels, cur_vowels) return max_vowels
@mallikarjuna9998
@mallikarjuna9998 Ай бұрын
absolutely smashed ... no words about your explanation
@prawnydagrate
@prawnydagrate Ай бұрын
WOW. I always expected making a Sudoku solver to be insanely complicated, but clearly not. I actually suck at solving Sudokus, but I'm planning on making a Sudoku solver for a school project, and this is perfect. I didn't expect to understand anything at all when I clicked on this video. I'm really surprised how easy this seems. I hope it is how it seems 🤞
@rishabhranjan5162
@rishabhranjan5162 Ай бұрын
I love these kind of explanations
@mfc87tech52
@mfc87tech52 Ай бұрын
Hello my friend, allah bless you, I could not find the course cause the link is broken
@RA-eg8tw
@RA-eg8tw Ай бұрын
This was amazing! I actually understood the sudoku backtracking algorithm finally.
@Rishi-he7hs
@Rishi-he7hs Ай бұрын
You can alsow think in terms of relative velocity From the point of view of slow pointer, fast pointer is moving 1 node ahead at a time So if finally fast pointer reaches the slow one, then definitely there is a cycle I think, using the similar approach if you move slow pointer n times forward and the fast one (n+1) times forward, that should also work
@Bachelor052
@Bachelor052 Ай бұрын
Thanks!
@pavanbalu2734
@pavanbalu2734 Ай бұрын
I think, In the end code slow and fast should point to arr[0] instead of just 0
@madhavkwatra5888
@madhavkwatra5888 Ай бұрын
Superb explanation , Thanks.
@DheerajKumar-fn4zq
@DheerajKumar-fn4zq Ай бұрын
I wasted a lot of time understanding it, thanks to this amazing video I finally understood :).
@playingwithmhdsulu786
@playingwithmhdsulu786 Ай бұрын
Help full video thank you❤
@user-kp2uk3cg4g
@user-kp2uk3cg4g Ай бұрын
Best video
@gimmametdeboys1505
@gimmametdeboys1505 Ай бұрын
Really liked the tree visualtion, made it so much easier to understand.
@TABandiTA
@TABandiTA Ай бұрын
Thanks a lot. We need more non-indian math/coding youtubers.
@ishajindal7862
@ishajindal7862 Ай бұрын
Hey. Could you please explain how to calculate the time complexity?
@vocipy2068
@vocipy2068 Ай бұрын
Giving the mathematical explanation for getting the entry point of cycle was the best part !
@R_SinghRajput
@R_SinghRajput Ай бұрын
Crazy explanation 🔥😎
@spiritgaming6499
@spiritgaming6499 Ай бұрын
Amazing video