Karp-Rabin String Matching Algorithm | Substring Search Pattern

Ғылым және технология

Discover the inner workings of search engines like Google! In this video, we'll explore the Karp-Rabin algorithm, a powerful technique for efficient string searching using hashing.
Take part in the learning in public initiative! Share your learnings on LinkedIn and Twitter with #DSAwithKunal & don't forget to tag us!
👉 Resources
- Join Replit: join.replit.com/kunal-kushwaha
- Lecture code: replit.com/@KunalsReplit/Karp...
- Complete Java DSA playlist: • Java + DSA + Interview...
- Code, Assignments, & Notes: github.com/kunal-kushwaha/DSA...
➡️ Connect with me: kunalkushwaha.com
👨‍💻 Join WeMakeDevs: wemakedevs.org
#dsa #placement

Пікірлер: 44

  • @KunalKushwaha
    @KunalKushwaha8 ай бұрын

    👉 Resources - Join Replit: join.replit.com/kunal-kushwaha - Lecture code: replit.com/@KunalsReplit/KarpRabin-Hashmaps

  • @poorpanda9033
    @poorpanda90338 ай бұрын

    If anyone is new to this bootcamp! Let me tell you it's amazing I've completed almost every single videos so far. By the end of the playlist you'll have so much confidence to tackle DSA questions by your own. Just make sure you're following the notes + assignments & Tips that kunal gives !! Some tips that I always remember when i approach a problem (kunal has mentioned it) - Don't memorize, understand the problem / logic - Hard Question is easy for those who have studied, Easy Question is hard for those who haven't - The function will return from where it was called !! ( Recursion )

  • @_Dream_Dive_

    @_Dream_Dive_

    26 күн бұрын

    That last thing is the most important

  • @adolfocarrillo248
    @adolfocarrillo2485 ай бұрын

    Kunal that updateHash method is kind of clever ha!! nice technique!!! Thanks for sharing your knowledge!!!!

  • @believe_it2380
    @believe_it23807 ай бұрын

    These videos are so great, i am also done with each and every video, and just looking forward for notification of new Videos, .... It would be very grateful of Mr. Kunal if he could be more frequent in uploading videos, ❤❤ i don't have much patience for your videos

  • @vaibhavimishra763
    @vaibhavimishra7638 ай бұрын

    Best course i suggested many friends ❤❤❤❤

  • @sheikhmkrifat7749
    @sheikhmkrifat77498 ай бұрын

    Love from Jashore University of science and technology ,Bangladesh Sir❤. I am from non cs, following you to be a selftaught programmer.

  • @jk-sm6qr
    @jk-sm6qr3 ай бұрын

    Thanks Kunal!!

  • @apjdumer9233
    @apjdumer92338 ай бұрын

    Inspirational ❤❤❤

  • @ShivamKendre-fc3su
    @ShivamKendre-fc3su8 күн бұрын

    Great video

  • @easterntoronto
    @easterntoronto8 ай бұрын

    GOAT for a Reason....👍

  • @tusharkumar2290
    @tusharkumar22908 ай бұрын

    String has a function called contains( " "). It has Log n complexity :) , Rabin karp can be said as more algorithmic approach whereas contains can be classified as general apporach

  • @simalinaaz5640
    @simalinaaz56408 ай бұрын

    Second video on same day❤

  • @ayushprasad8207
    @ayushprasad82078 ай бұрын

    Wah ek sath

  • @lakshitjain6923
    @lakshitjain69238 ай бұрын

    Sigma uploaded 2 videos at 3 am

  • @theseriousguy2136
    @theseriousguy21365 ай бұрын

    I guess the CalculateHash function will get to the limit of mathematical computations. suppose str.length() is around 1000 It would need to calcu;ate 101^1000 and that is out of bounds of long storage, and I guess pow() too couldn't cacluate it.

  • @shadowmonarch1432
    @shadowmonarch14328 ай бұрын

    At 2:20 the example ur explaining is sliding window technique with a TC of O(26*N)(for this problem) = O(N) By the way Big Fan bruh❤️

  • @shyam4034

    @shyam4034

    8 ай бұрын

    Ninnu ekkado chusa bhayya

  • @bahultyagi

    @bahultyagi

    7 ай бұрын

    Yes he said its O(n*n) which is wrong

  • @LowkeyCoder
    @LowkeyCoder8 ай бұрын

    ❤❤❤

  • @RishiRajxtrim
    @RishiRajxtrim8 ай бұрын

    🙏👍

  • @atharvameher5880
    @atharvameher58806 ай бұрын

    Would this work using something non-prime?

  • @elco7956
    @elco79567 ай бұрын

    I don't really understand the updateHash function

  • @rishu_singh_
    @rishu_singh_6 ай бұрын

    what if we need to count that how many times b string contains a

  • @sufiserious798

    @sufiserious798

    Ай бұрын

    Just use a counter variable, and in the condition where all characters match, increase counter by 1. At the end when the loop ends either return or print the value of counter.

  • @user-tl9cr7ri3p
    @user-tl9cr7ri3p3 ай бұрын

  • @piyushgupta8763
    @piyushgupta87638 ай бұрын

    Cant we just use b.contains(a)?

  • @shyam4034

    @shyam4034

    8 ай бұрын

    That also uses an algorithm similar to this one .

  • @ALIHAMZAAKRAM-oe2su
    @ALIHAMZAAKRAM-oe2su8 ай бұрын

    I like to say Rabin-karp is it okay

  • @KunalKushwaha

    @KunalKushwaha

    8 ай бұрын

    yes

  • @Bavasharan
    @Bavasharan6 ай бұрын

    Can anyone pls explain why we divide by prime in order to get new hash

  • @aveshsingh491

    @aveshsingh491

    5 ай бұрын

    since we were multiplying with prime in order to calculate the hash with that character and now since we want to remove that character from our window therefore we need to not just subtract that character but as well divide the new hash with the prime.

  • @Bavasharan

    @Bavasharan

    5 ай бұрын

    @@aveshsingh491 tq so much

  • @sathishloal5916
    @sathishloal59165 ай бұрын

    Bro actually it takes n-pattern length times iterated and in each iteration it takes two iterations of length of pattern for generating hashcodes and also checking for same characters or not, if hash is matched Finally it also take O(nxm ) time ❤ Tell me if im wrong☺️ But krunal playlist is awesome🧡🧡🧡

  • @NavneetKumar-lg3nv
    @NavneetKumar-lg3nvАй бұрын

    not able to understand line no 13

  • @NavneetKumar-lg3nv

    @NavneetKumar-lg3nv

    Ай бұрын

    got it

  • @Liku108
    @Liku1088 ай бұрын

    Hey kunal can you give a refferal to me

  • @KunalKushwaha

    @KunalKushwaha

    8 ай бұрын

    no

  • @Liku108

    @Liku108

    8 ай бұрын

    @@KunalKushwaha ok but please make a video for how to apply for Google

  • @KaizokuOuNaruto

    @KaizokuOuNaruto

    8 ай бұрын

    ​@@KunalKushwaha40lpa fraud will refer? LOL made fools out of lakhs of people and that devops course has gone extinct just uploads promotion videos of tools these days.. free free ke chakkar me big scam of trust... fraudster kunal

  • @KaizokuOuNaruto

    @KaizokuOuNaruto

    8 ай бұрын

    ​@@KunalKushwahaYou wont reply to or atleast complete your bootcamp but youll show arrogance for someone asking you a referral politely.. karma hits back fraudster... played games with trust,viral controversies,hype.. and the end result is zero..

  • @gojosatoru988

    @gojosatoru988

    8 ай бұрын

    ​@@KaizokuOuNarutowhat karma bro, if you don't like him don't watch his videos. Previously these types of detailed courses were paid, a kind man started it for free while managing his own work, and you're calling him fraud!!!!! Cheap mentality 😞

Келесі