Hashing | Maps | Time Complexity | Collisions | Division Rule of Hashing | Strivers A2Z DSA Course

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • Register for free in Coding Contest: bit.ly/RV_CodeRushX
    Full Course: takeuforward.org/strivers-a2z...
    Notes: takeuforward.org/hashing/hash...
    You can follow me across social media, all my handles are below:
    Linkedin/Instagram/Telegram: linktr.ee/takeUforward
    0:00 Introduction
    2:01 Why Hashing ?
    10:43 Problem 1 - Count elements of array
    14:00 Problem 1 - Code
    18:06 Maximum hash Array size (Main Vs Global)
    22:06 Character Hashing & Problem - 2
    30:16 Problem - 2 Code
    33:52 Map / Hash Map
    38:39 Problem - 1 Code by map
    42:03 Problem - 2 Code by map
    43:00 Time Complexity (map), unordered_map
    47:00 Hashing Methods
    54:30 Collision
    58:30 Homework
    59:56 Outro

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

  • @takeUforward
    @takeUforward  Год назад +113

    Register for free in Coding Contest: bit.ly/RV_CodeRushX
    Let's march ahead, and create an unmatchable DSA course! ❤
    Can someone please add timestamps, I will add them post it.

    • @111rhishishranjan2
      @111rhishishranjan2 Год назад +3

      Striver, please teach fast, sliding window algorithm and other stuff are incomplete. pls striver be fast little bit in uploading video

    • @MayankSharma-vi1ok
      @MayankSharma-vi1ok Год назад +13

      0:00 Introduction
      2:01 Why Hashing ?
      10:43 Problem 1 - Count elements of array
      14:00 Problem 1 - Code
      18:06 Maximum hash Array size (Main Vs Global)
      22:06 Character Hashing & Problem - 2
      30:16 Problem - 2 Code
      33:52 Map / Hash Map
      38:39 Problem - 1 Code by map
      42:03 Problem - 2 Code by map
      43:00 Time Complexity (map), unordered_map
      47:00 Hashing Methods
      54:30 Collision
      58:30 Homework
      59:56 Outro
      As always, Your content is full of Important & Valuable stuff.
      Thank you very much!!

    • @Shubham-bh1ph
      @Shubham-bh1ph Год назад +2

      striver be fast. we have to complete this atoz course as early as possible you are too late to upload

    • @prithammahato1915
      @prithammahato1915 Год назад

      UNDERSTOOD_BHIYA :)

    • @Tyrant_Eye
      @Tyrant_Eye 7 месяцев назад

      Could you make a video on implementation of hash table as well as it was asked in Sprinklr interview in intern in our college.

  • @darshilpatel7585
    @darshilpatel7585 Год назад +324

    This DSA playlist will be appreciated for hundreds of years.❤

    • @SamrathChauhan-re3jb
      @SamrathChauhan-re3jb 3 месяца назад +14

      I feel like within 20 years from now striver will make another series that works on quantum computers and that will live for 100 years.

  • @lost_hand
    @lost_hand 5 месяцев назад +41

    If i had teacher like him in my college I wouldn't have watched RUclips channel before day of exam... The way he teach and make us understand concept...hatsoff sir Also thank u for free DSA course🙏🙏

  • @falgunitagadkar4097
    @falgunitagadkar4097 10 месяцев назад +47

    Oh My God!!!!!!!!!
    Even after knowing Hashing came here...because I was very sure...Striver's video will definitely have something valuable. You are truly a Gem Striver. Always grateful to you🙇‍♀

  • @harshkunal7365
    @harshkunal7365 Год назад +29

    Hashing notes link -
    drive.google.com/file/d/1iShWR1EH3YKEFIRMSyyk8srAYnkgG9tM/view?usp=share_link

    • @izukumidoriy633
      @izukumidoriy633 Год назад +2

      💯💯

    • @nikhilsharma2236
      @nikhilsharma2236 4 месяца назад +2

      bro give all notes link

    • @nikhilsharma2236
      @nikhilsharma2236 4 месяца назад +2

      i meant all topics apart from hashing

    • @lonerider6695
      @lonerider6695 15 дней назад +1

      very helpful buddy can you provide it for all topics for which u have prepared

    • @character_coded4798
      @character_coded4798 12 дней назад

      please provide all the notes notes you have. we will be very grateful!

  • @Aadhya2842
    @Aadhya2842 10 дней назад +2

    Understood..I had a college coding test yesterday, and I managed to solve 2 out of 3 questions just by following this amazing playlist up to the Hashing section. Thank you so much, bhaiyya! Your videos are a lifesaver!

  • @Manishgupta200
    @Manishgupta200 Год назад +71

    In glaobl and main(), max size decleration concept in array is very helpful and In another conceptual question also. Your best thing in every tutorial i liked so much is you taught us question from BFS approach to Optimised approach and by different method you solved question and also taught us the preferable method accoding to it's space and time complexity.
    Topic covered:-
    -> For loop method (BFS)
    -> Array hashing (Optimised)
    -> Number hashing
    -> Character hashing (2 method)
    -> Maximum size concept in decleration of array size.
    -> TC difference by using in map and unordered_map STL (normally Unordered_map way is prefered by you)
    -> Method of Hashing
    -> Explain Division method - linear chaining concept
    -> Collision (that's why why worst case TC is O(n) by using unordered_map STL)
    -> Key-Pair data structure and data type decleration difference in map & in unordered_map
    Thankyou Striver for such an amazing content. 🔥🔥

    • @animeislob3620
      @animeislob3620 5 месяцев назад +1

      bhai lekin ye concept java ma to apply nhi hota h na? kyuki mene dekha ma 2^31 - 1 size ka bhi declare kr paa rha hu

    • @vaibhavagarwal602
      @vaibhavagarwal602 Месяц назад

      I domt get why you wasted time in writing this dude

  • @shivangigarambha4981
    @shivangigarambha4981 Год назад +8

    Understood! I have watched many videos to understand hash and map, but this is the best among all of them.

  • @deepankshugautam9289
    @deepankshugautam9289 Год назад +1

    Understood!!! thank you and I'm really grateful I found you

  • @omgaikwad5962
    @omgaikwad5962 Год назад +2

    Understood !
    Excellent teaching.

  • @Navya0310
    @Navya0310 12 дней назад +1

    00:06 Hashing is an important topic in DS algo
    05:31 Hashing is a technique to store and fetch data in a faster way.
    11:30 Pre-compute the number of occurrences for each element in the array.
    17:23 Arrays can be used for number hashing and character hashing.
    22:55 You can count the occurrence of a specific character in a string by iterating through the string and comparing each character.
    28:46 Hashing characters in a string using an array
    34:15 Map and unordered map in C++
    39:58 Map in C++ can be used to store and access data efficiently
    45:38 The number of elements in the map affects the computation time.
    51:20 The division method is used to retrieve values and trim numbers.
    56:45 Collision handling in unordered map

  • @madhavagrawal5581
    @madhavagrawal5581 Год назад +1

    A person making impact on many people life!!! understood

  • @user-fo8fi4bb7m
    @user-fo8fi4bb7m Год назад +11

    You are a great teacher, and I want to be like you, and teach others who were in need, I am learning topics In a way to teach others, so that my concepts are also getting revised, simply using Feynmann technique and I am huge fans of your Brother, Thanks a lot from my heart. I can promise you, you can hear my name like you in upcoming months or years, but sure you will.

  • @harshitrajsharma01
    @harshitrajsharma01 16 дней назад

    Understood in a very clear manner.
    The best structured DSA playlist

  • @harshraje516
    @harshraje516 Год назад +1

    very nice video understood whole concept of hashing in one go at 1.5 speed
    😇

  • @ronakvaghela2714
    @ronakvaghela2714 Месяц назад +1

    The explanation you gave in collision and worst case scenario was so good and it was brilliant. Thankyou so much for making this playlist. It means alot to me and other people following this playlist.!!

  • @sid17_cgdyt
    @sid17_cgdyt Год назад +2

    superb striver ... Understood it very well

  • @vardhamanbhandari5644
    @vardhamanbhandari5644 Год назад +3

    Hands off to your efforts🙌🙌

  • @changed217
    @changed217 11 месяцев назад +4

    Understood, brilliant explanation, and for the person who has written the article on the site too also brilliant, thank you so much.

  • @bhaveshkumar6842
    @bhaveshkumar6842 6 месяцев назад +14

    He's the best by a very big margin when it comes to teaching DSA concepts.♥

  • @sukhpreetsingh5200
    @sukhpreetsingh5200 Год назад +4

    Amazing lecture 😍

  • @ketanjagat3005
    @ketanjagat3005 Год назад +7

    Understood everything very well❤❤❤❤❤❤ and even learned so many new things by you. Thankyou so much bhaiya❤❤❤❤
    I would recommend everybody to have this sheet for better understanding of DSA and even things which might anybody will tell you for FREEE!!!!!!

  • @expl0itr
    @expl0itr 3 месяца назад +2

    If someone is getting : the value of variable "size" cannot be used as a constant while trying, int arr[size] : not all c++ compilers support dynamic array in this way.
    you can use --> new int[size]();

  • @joydeepdas29
    @joydeepdas29 Год назад +1

    Understood. Thanks for the awesome tutorials 😄

  • @yuktijhawar6729
    @yuktijhawar6729 5 месяцев назад +7

    I was recommended by a friend to watch this playlist. And it is extremely helpful and amazing. Thank you so much sir for providing such a great quality of content.

  • @shivanand0297
    @shivanand0297 2 месяца назад

    im doing dsa in typescript without a problem all thanks to you striver my man

  • @stith_pragya
    @stith_pragya 5 месяцев назад

    UNDERSTOOD.........Thank You So Much for this wonderful video.................🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @mrbeastlove77
    @mrbeastlove77 Год назад +12

    Amazing content you are making DSA like a interesting web series .... Thanks alot brother ... Please make more contents

  • @ananya2289
    @ananya2289 Месяц назад

    Best explanation, thankyou so much. I was struggling with understanding this so much & now its so clear and seems doable.

  • @cinime
    @cinime Год назад +3

    Understood! Super fantastic explanation as always, thank you very much!!

  • @ManavMSanger
    @ManavMSanger Год назад

    Understood. Thank you. This was a valuable video.

  • @039puneethbatchu2
    @039puneethbatchu2 Год назад +1

    Understood... You are just amazing broo 💯💯

  • @sanatanihinduharekrishna
    @sanatanihinduharekrishna Год назад +1

    understood everything, thank you sir.

  • @The_CR_Cosmos
    @The_CR_Cosmos Год назад

    Man you are amazing. thank you so much for getting me back on track

  • @sashikumarreddy9081
    @sashikumarreddy9081 11 месяцев назад

    understood. best channel for dsa.

  • @tonystark-oq3mm
    @tonystark-oq3mm Год назад +8

    Understood ! Amazing content as always ! Please keep it going.

  • @moonchild4632
    @moonchild4632 Месяц назад

    Understood! you are such a fantastic teacher.

  • @manavsingh5919
    @manavsingh5919 10 месяцев назад +1

    Thank you so much striver...I understood everything🙂

  • @noobgamer9115
    @noobgamer9115 Год назад +2

    understood and thank you for your A2Z DSA SHEET this helps me to clear my all basic concepts in programming as well as in DSA

  • @ShivkumarRajmane
    @ShivkumarRajmane 2 месяца назад +1

    summarize this video00:06 Hashing is an important topic in DS algo
    05:31 Hashing is a technique to store and fetch data in a faster way.
    11:30 Pre-compute the number of occurrences for each element in the array.
    17:23 Arrays can be used for number hashing and character hashing.
    22:55 You can count the occurrence of a specific character in a string by iterating through the string and comparing each character.
    28:46 Hashing characters in a string using an array
    34:15 Map and unordered map in C++
    39:58 Map in C++ can be used to store and access data efficiently
    45:38 The number of elements in the map affects the computation time.
    51:20 The division method is used to retrieve values and trim numbers.
    56:45 Collision handling in unordered map

  • @9a56mahabirjaiswal9
    @9a56mahabirjaiswal9 Год назад +6

    I tried to learn hashing /hash map 2-3 times from different channel but didn't able to understood so I keep on skipping this topic everytime but this is the first time that I am able to understand it in very easy way

  • @mdatiquealam8050
    @mdatiquealam8050 7 месяцев назад

    Understood !! thank you so much for this striver bhai❤❤

  • @venkatarao.gurram
    @venkatarao.gurram Год назад +2

    your teaching is awesome

  • @msdarshankirthic9990
    @msdarshankirthic9990 Год назад +1

    understood bruh, thank you so much ❤

  • @rishavvatsa9793
    @rishavvatsa9793 Год назад

    understood❤
    Thankyou bhaiya for this amazing explaination

  • @roshankumar-of5ky
    @roshankumar-of5ky Год назад

    understood and loved it

  • @sunnymishra2120
    @sunnymishra2120 Год назад +1

    great class as always!😃😃

  • @sarthakkadam7615
    @sarthakkadam7615 8 дней назад

    bro ur teaching method is like concept of recursion .its best and i understood everything

  • @ronitpunjwani5384
    @ronitpunjwani5384 10 месяцев назад

    really really appreciate you man! UNDERSTOOD!

  • @simpy2965
    @simpy2965 10 месяцев назад +1

    Completely undestood bro thanks❤

  • @UECHarshaVardhanRavipalli
    @UECHarshaVardhanRavipalli Год назад +1

    You are really amazing bhai!! We are eagerly waiting for your next video that you upload!!!`
    Please upload as soon as possible bhai!😊

  • @Hipfire786
    @Hipfire786 3 месяца назад

    understood everything explained wonderfully

  • @annoniimous
    @annoniimous Год назад +3

    i have to no words to appreciate your course... #bestAmongAllPaidResources

  • @AmanKumar-fe2ez
    @AmanKumar-fe2ez Год назад

    Thankyou Striver bhaiya

  • @aatirali7696
    @aatirali7696 Год назад +2

    WAITING FOR THIS SIR
    THAN YOU SO MUCH ♥

  • @ankurmandal8899
    @ankurmandal8899 2 месяца назад

    Yes, I understand it completely sir

  • @saimanojmohanty1
    @saimanojmohanty1 5 месяцев назад

    Understood.
    Thanks for such great stuff.

  • @thelearner4930
    @thelearner4930 4 месяца назад

    Understood bhaiya , thanks for this course!!

  • @aryanpatel6490
    @aryanpatel6490 10 месяцев назад +1

    AMazing content striver you are like a big brother to me 😇😇😇😇

  • @PRALAY.THAKUR
    @PRALAY.THAKUR 11 месяцев назад

    Great explanation Bhaiya 🎉🎉❤❤

  • @darkjokeryt9856
    @darkjokeryt9856 29 дней назад

    understood, thankyou very much, we appreciate your efforts.

  • @King_Dragon_Luffy
    @King_Dragon_Luffy Год назад

    Specifically came to RUclips after watching the embedded video to hit the like button greatly appreciate your efforts :)

  • @jaisarita
    @jaisarita 4 месяца назад

    Awesome teaching style 👏🏼

  • @shwetankdwivedi513
    @shwetankdwivedi513 10 месяцев назад +2

    Very nicely and easiy explained, just wanted to add, like it would be great that we study about the load factor as well in hashing because some times that question also comes in an interview that what is load factor, *why ideal load factor is around 0.7*, also if people have time they can try to implement this division method for implementing Maps, It would give a great insight and a confidence that how things are working.
    Thanks.

  • @Mohammad46552
    @Mohammad46552 9 месяцев назад

    understood. Great content

  • @shubhamsharma8364
    @shubhamsharma8364 Год назад

    Best video on Hashing🎉

  • @AbdurRahman-sp6sm
    @AbdurRahman-sp6sm 11 месяцев назад

    great vedio content, I am grateful to you

  • @mrsubham277
    @mrsubham277 Год назад +4

    Waiting for it after watching pattern printing and math video 😄🤓

  • @mrsttechno5974
    @mrsttechno5974 Год назад

    I understood everything lots of thanks to you my best sir💝👍💪

  • @wahabshaik6843
    @wahabshaik6843 Год назад

    understood striver u r one of the best

  • @harishkulkarni7244
    @harishkulkarni7244 11 месяцев назад

    Understood, thank you so much!

  • @rishabhkumar-qs3jb
    @rishabhkumar-qs3jb 2 месяца назад

    awesome series, like it very much :)

  • @asmittyagi6250
    @asmittyagi6250 6 месяцев назад +9

    Wow, just stumbled upon this video and I can't believe what I've been missing out on! I used to be intimidated by DSA, especially topics like hashing, but your mind-blowing explanation has changed everything for me. I regret not starting earlier, but hey, better late than never. Your teaching style is nothing short of incredible - it's like having a god-like figure guiding me through the complexities of DSA right on my screen. Thank you, sir, for making this seemingly daunting task so much more approachable. Love you for this, and I'm excited to dive deeper into the world of algorithms now!

  • @VINAYKUMAR-cv7nv
    @VINAYKUMAR-cv7nv Год назад

    Thanks for this wonderfull course 😍😍

  • @037_shivamkumar7
    @037_shivamkumar7 Год назад

    Amazing lec..

  • @stable577
    @stable577 5 месяцев назад +1

    28:41(ch-'a'), 31:58(If there were not any restriction on character, then u should take hash[256], i.e. array for all characters),37:28(advantage of HashMap compared to Hashing)

  • @saketjaiswal9381
    @saketjaiswal9381 Год назад +1

    a lecture on nested vetor vectorint such things are getting confusing vector of vector i have watched stl still little confused

  • @dhruvpatel8037
    @dhruvpatel8037 11 месяцев назад +1

    Understood !, Thank You :)

  • @makingthamilan1592
    @makingthamilan1592 8 месяцев назад

    great man, thanks for the course🥰

  • @samuelfrank1369
    @samuelfrank1369 9 месяцев назад

    Understood. Thanks a lot.

  • @satyamraj6957
    @satyamraj6957 Год назад +2

    thnx a lot striver please continue to teach in the same way you are an awesome teacher
    had it not been your efforts I guess I would not have been able to code anything
    once again thnx a lot

  • @user-is6ky7pp2n
    @user-is6ky7pp2n 3 месяца назад

    Understood !! Keep Going Sir !!

  • @VivekSharma-sk3vp
    @VivekSharma-sk3vp 4 месяца назад

    This course is better than paid courses , just amazing content..

  • @anubhav4306
    @anubhav4306 Год назад

    Understooood bhaiya!!!!

  • @Atul_25
    @Atul_25 8 месяцев назад

    Absolutely loved it 🤩🤩

  • @adarshsingh5697
    @adarshsingh5697 Год назад

    Ek hi dil hai kitni baar jeetoge bhaiya..@striver

  • @DevashishJose
    @DevashishJose Год назад

    Understood. thank you.

  • @parth2439
    @parth2439 Год назад +1

    Hope you start making video with consistency once to you reach Poland. Thank YOu :)

  • @AYUSHSINGH-zq2po
    @AYUSHSINGH-zq2po Месяц назад +1

    Very well Understood !!

  • @susmitapatil4847
    @susmitapatil4847 10 месяцев назад

    Understood. Best content

  • @PUNEETHKUMARVH
    @PUNEETHKUMARVH Месяц назад

    Understood ,thanks striver!

  • @VipinKumar-jd5ug
    @VipinKumar-jd5ug 9 месяцев назад

    Great stuff. Just waoo❤❤❤

  • @ngarts2614
    @ngarts2614 Год назад

    Was waiting for this bhaiya..thank you so much

  • @bhaveshvaishnav844
    @bhaveshvaishnav844 6 месяцев назад

    Understood! Love from agra.

  • @yikes3807
    @yikes3807 Год назад

    thank You striver!!

  • @it_08amanagarwal35
    @it_08amanagarwal35 Год назад +1

    Bro excellent explanation ⚽

  • @aswiniv3516
    @aswiniv3516 Год назад

    understood sir, thanks a lot

  • @Dinesh-rn9iy
    @Dinesh-rn9iy Год назад +1

    best teacher onboard!💯💯💯

  • @priyankavasam8769
    @priyankavasam8769 Год назад

    wonderful lecture🤩🤩

  • @vikramjangid985
    @vikramjangid985 Год назад +1

    what a wonderful explanation of each and every minor thing. Amazing video understood everything.
    Thank you for the best explanation.