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

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 982

  • @takeUforward
    @takeUforward  ปีที่แล้ว +141

    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 ปีที่แล้ว +14

      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 10 หลายเดือนก่อน

      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 ปีที่แล้ว +478

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

    • @SamrathChauhan-re3jb
      @SamrathChauhan-re3jb 6 หลายเดือนก่อน +24

      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.

    • @ahuman9964
      @ahuman9964 หลายเดือนก่อน +9

      @@SamrathChauhan-re3jb bhai tum dono theek ho faaltu ki tareef se accha hai ke jaake padhai karo

    • @SamrathChauhan-re3jb
      @SamrathChauhan-re3jb หลายเดือนก่อน

      @@ahuman9964 ok bhide sir :)

  • @falgunitagadkar4097
    @falgunitagadkar4097 ปีที่แล้ว +84

    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🙇‍♀

  • @shubhamagarwal1434
    @shubhamagarwal1434 2 หลายเดือนก่อน +11

    #Free Education For All... # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this..."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India......

  • @lost_hand
    @lost_hand 8 หลายเดือนก่อน +73

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

    • @sumeght1878
      @sumeght1878 4 หลายเดือนก่อน +1

      🤣🤣🤣🤣🤣

  • @Aadhya2842
    @Aadhya2842 3 หลายเดือนก่อน +17

    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!

  • @shubhamagarwal1434
    @shubhamagarwal1434 2 หลายเดือนก่อน +16

    #Free Education For All...... # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this...."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India.

  • @Manishgupta200
    @Manishgupta200 ปีที่แล้ว +76

    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 8 หลายเดือนก่อน +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 5 หลายเดือนก่อน

      I domt get why you wasted time in writing this dude

    • @KrishnaKumar-b4m9p
      @KrishnaKumar-b4m9p 2 หลายเดือนก่อน

      @@vaibhavagarwal602 it will be a nice revision for him

  • @Navya0310
    @Navya0310 3 หลายเดือนก่อน +27

    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

    • @shahisthatahniyath379
      @shahisthatahniyath379 หลายเดือนก่อน

      I wanted to learn DSA in java from beginning but wherever I search i am getting DSA with c++ only i don't know c++ . please 🙏 recommend me a channel as good as tuf so that I can learn my complete DSA from Beginning... Please didi help..

    • @ज़रिया
      @ज़रिया 29 วันที่ผ่านมา

      ​@@shahisthatahniyath379 code with harry cpp playlist and strivers a-z dsa playlist, that should be enough

    • @Tbm4545
      @Tbm4545 8 วันที่ผ่านมา

      ​@@shahisthatahniyath379bruhh if u know logic u must do in your lang, and if u cant do so then u have not learning java or any coding lang in correct way u r just looking at the. Ode and typing or memorizing

  • @shivangigarambha4981
    @shivangigarambha4981 ปีที่แล้ว +18

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

    • @vjaykrsna
      @vjaykrsna 2 หลายเดือนก่อน

      Truly a gem! I wish i came across this playlist 6 months ago.

  • @AditiPawar-u5q
    @AditiPawar-u5q ปีที่แล้ว +7

    Your command of English is commendable. You speak so clearly and do not even use fillers. Please tell me how and from where did you practice English speaking? please guide me so that I can also improve my english.

    • @TheViralClovers
      @TheViralClovers 7 หลายเดือนก่อน +1

      read good English novels

  • @bhaveshkumar6842
    @bhaveshkumar6842 9 หลายเดือนก่อน +18

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

  • @yuktijhawar6729
    @yuktijhawar6729 9 หลายเดือนก่อน +11

    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.

  • @ShivkumarRajmane
    @ShivkumarRajmane 6 หลายเดือนก่อน +4

    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

  • @expl0itr
    @expl0itr 6 หลายเดือนก่อน +5

    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]();

  • @asmittyagi6250
    @asmittyagi6250 9 หลายเดือนก่อน +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!

  • @RamuSarita-n4u
    @RamuSarita-n4u ปีที่แล้ว +12

    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.

  • @sunnysaini3825
    @sunnysaini3825 5 หลายเดือนก่อน +6

    Hashing using Map in java :
    public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    System.out.print("Enter the value of n : ");
    int n = cin.nextInt();
    int arr[] = new int[n];
    System.out.print("Enter values of array : ");
    for (int i=0;i

  • @stable577
    @stable577 8 หลายเดือนก่อน +2

    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)

  • @swarupsaha9064
    @swarupsaha9064 ปีที่แล้ว +4

    Hi Striver,
    Few points regarding the current lecture:
    - I believe for Java HashMap is an Unordered data Structures with O(1) avg TC and O(N) for worse TC
    - TreeMap is an Ordered data structures with O(log(N)) TC for good, avg and worse case scenario.
    - Please correct me if i'm wrong but here we should implement TreeMap in this code for JAVA instead of HashMap

  • @9a56mahabirjaiswal9
    @9a56mahabirjaiswal9 ปีที่แล้ว +9

    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

  • @mrbeastlove77
    @mrbeastlove77 ปีที่แล้ว +15

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

  • @ronakvaghela2714
    @ronakvaghela2714 4 หลายเดือนก่อน +2

    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.!!

  • @harshkunal7365
    @harshkunal7365 ปีที่แล้ว +63

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

    • @izukumidoriy633
      @izukumidoriy633 ปีที่แล้ว +3

      💯💯

    • @nikhilsharma2236
      @nikhilsharma2236 7 หลายเดือนก่อน +4

      bro give all notes link

    • @nikhilsharma2236
      @nikhilsharma2236 7 หลายเดือนก่อน +3

      i meant all topics apart from hashing

    • @lonerider6695
      @lonerider6695 3 หลายเดือนก่อน +1

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

    • @character_coded4798
      @character_coded4798 3 หลายเดือนก่อน

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

  • @saketjaiswalSJ
    @saketjaiswalSJ ปีที่แล้ว +2

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

  • @changed217
    @changed217 ปีที่แล้ว +6

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

  • @priyathakur6418
    @priyathakur6418 21 วันที่ผ่านมา

    Time invested here!!
    seriously i came here and it makes my concepts crystal clear!!

  • @leetcoder6569
    @leetcoder6569 ปีที่แล้ว +21

    Thanks, striver_79, ur high class lectures of DP helps me a lot.

    • @learncreative4732
      @learncreative4732 ปีที่แล้ว +3

      Sir one request please add your websit graph and dp rest note . It is very useful for me.

    • @takeUforward
      @takeUforward  ปีที่แล้ว +12

      @@learncreative4732 Done

    • @learncreative4732
      @learncreative4732 ปีที่แล้ว +2

      @@takeUforward thanks

  • @Tbm4545
    @Tbm4545 8 วันที่ผ่านมา

    I just came here because on hacker earth i got a problem with title favourite singer and it need hashing i used the first simple numerical array methos and it wokred partially, because the code on hackdr earth requires more nos like as striver said the array method can take upto 10 rais to 6 in main.
    Thing is i am writing this along with the numerical i got many in depth learning about the concept. I think i saw one of the best teacher

  • @ankit_tiwari2001
    @ankit_tiwari2001 4 หลายเดือนก่อน +4

    23:11
    For Python users
    name = ""
    def count_char(s,target):
    char_dict = {}
    for char in s:
    char_dict[char] = char_dict.get(char,0) + 1
    return char_dict[target]

    • @aryanrajsingh3348
      @aryanrajsingh3348 2 หลายเดือนก่อน +1

      better use defaultdict right?, dict will throw key error if accessing element that doesnt exist

  • @FaisalMasood-q6g
    @FaisalMasood-q6g 2 หลายเดือนก่อน +1

    Understood..You put everything to make it clear..

  • @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!!!!!!

  • @sainaid
    @sainaid 2 หลายเดือนก่อน

    This DSA course will be appreciated for decades. Thankyou ❤

  • @GM-pk4li
    @GM-pk4li ปีที่แล้ว +13

    this course is better than any paid course 100 percent agree

  • @deepankshugautam9289
    @deepankshugautam9289 ปีที่แล้ว +2

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

  • @arunm619
    @arunm619 ปีที่แล้ว +15

    The hashing division method is a commonly used technique for generating hash codes in hash tables. It involves using the remainder of the division operation to calculate the hash value.
    Hash Function:
    The hash function takes the key as input and generates a hash code or hash value.
    The goal is to distribute the keys uniformly across the available hash table buckets.
    Division Operation:
    In the hashing division method, the hash function uses the division operation to calculate the hash value.
    The key is divided by a prime number, typically chosen as a suitable size for the hash table (e.g., the number of buckets).
    The remainder of the division operation (modulo operation) is taken as the hash value.
    Hash Value:
    The resulting hash value is an integer that represents the index of the bucket where the key-value pair will be stored in the hash table.
    The hash value should be within the range of valid bucket indices.
    Here's a simplified example in C++ to demonstrate the hashing division method:
    unsigned int HashFunction(const std::string& key, unsigned int tableSize) {
    unsigned int hashValue = 0;
    for (char ch : key) {
    hashValue = hashValue * 31 + ch; // 31 is a commonly used prime number
    }
    return hashValue % tableSize;
    }
    In this example, the HashFunction takes a string key and the size of the hash table as input. It iterates over each character in the key and calculates the hash value using the division method. The constant prime number 31 is used to multiply the intermediate hash value.
    It's important to choose a prime number as the divisor in the division operation to minimize clustering and distribute the keys more uniformly across the buckets. The choice of the divisor depends on various factors, such as the expected size of the hash table and the characteristics of the input data.

  • @muzziclover21
    @muzziclover21 หลายเดือนก่อน

    What a wonderful manner you have explained hashing, hats off to you!👏👏

    • @shahisthatahniyath379
      @shahisthatahniyath379 หลายเดือนก่อน

      I wanted to learn DSA in java, i don't know c++ .but whenever I search DSA using java I am getting DSA using c++ . please 🙏 recommend me a channel like tuf so that I can learn DSA in java from very beginning level....

  • @annoniimous
    @annoniimous ปีที่แล้ว +3

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

  • @shankysays
    @shankysays 8 หลายเดือนก่อน +1

    58:00 in java we can use complex class as key provided we overwrite the hashcode and equals method.

  • @arghyadeepmandal4458
    @arghyadeepmandal4458 ปีที่แล้ว +3

    If we do chaining like linked list also,insertion and deletion in linked list can be done in O(1) to make the array sorted.And binary search is O(logn).So how come it becones O(N) for storing and fetching in worst case.Most probably I guess there is more complex things happening internally 👽.
    Edit:- Binary search in linked list can't be done in O(logn)🙃

    • @paspulatileelaram2808
      @paspulatileelaram2808 9 หลายเดือนก่อน

      Agree we cant use binary search on singly linked list.... something more complex things is happening.

  • @harshitrajsharma01
    @harshitrajsharma01 3 หลายเดือนก่อน

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

  • @satvrii
    @satvrii ปีที่แล้ว +4

    Revolution for the students , ham senior ho gye , kaash hamare time pe aapne ye start kiya hota 🥺🥺🥺🥺

    • @sum_it_00
      @sum_it_00 4 หลายเดือนก่อน

      Bhai Mera to abhi 1st year khtm hua hai
      Striver op !

  • @venkatarao.gurram
    @venkatarao.gurram ปีที่แล้ว +2

    your teaching is awesome

  • @thefeel6716
    @thefeel6716 ปีที่แล้ว +6

    Bhaiya iss beech me maine pura recursion padh liya .Awesome series ... And Bhaiya please thoda frequencyy badha do.I know it's not easy to manage . But if possible please do so....Thank you

  • @aryankumararya1674
    @aryankumararya1674 2 หลายเดือนก่อน

    Thank you Striver for providing such high quality intuition building concept. Very much grateful to you !

  • @poonam-kamboj
    @poonam-kamboj ปีที่แล้ว +3

    at 20:22, in java I could declare the array with 10 power 8 i.e. (100000000) and it gave me heap space error at 10 power 9, inside the method.

  • @VivekSharma-sk3vp
    @VivekSharma-sk3vp 7 หลายเดือนก่อน +1

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

  • @mrsubham277
    @mrsubham277 ปีที่แล้ว +4

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

  • @madhavagrawal5581
    @madhavagrawal5581 ปีที่แล้ว +1

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

  • @sukhpreetsingh5200
    @sukhpreetsingh5200 ปีที่แล้ว +5

    Amazing lecture 😍

  • @bathroomsinger3026
    @bathroomsinger3026 หลายเดือนก่อน

    best teacher i have seen... the way u teach amazing

  • @vardhamanbhandari5644
    @vardhamanbhandari5644 ปีที่แล้ว +3

    Hands off to your efforts🙌🙌

  • @Anonymous-bu5bg
    @Anonymous-bu5bg หลายเดือนก่อน +2

    int n;
    cin >> n;
    int arr[n];
    shouldn't we use dynamically allocated array instead of the above code

  • @harshupreti1526
    @harshupreti1526 ปีที่แล้ว +499

    Google I am Coming

  • @sarthakkadam7615
    @sarthakkadam7615 3 หลายเดือนก่อน

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

  • @AS-gf3ci
    @AS-gf3ci ปีที่แล้ว +8

    The last portion, especially collision and linear chaining portion is not very clear to me. Otherwise good content. Keep it up and pls post the other videos sooner.. Cheers!!

  • @stith_pragya
    @stith_pragya 9 หลายเดือนก่อน

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

  • @tonystark-oq3mm
    @tonystark-oq3mm ปีที่แล้ว +8

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

  • @omgaikwad5962
    @omgaikwad5962 ปีที่แล้ว +2

    Understood !
    Excellent teaching.

  • @cinime
    @cinime ปีที่แล้ว +3

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

  • @darkexodus6404
    @darkexodus6404 ปีที่แล้ว +2

    Very neat explanation. Which software do you use for writing? Seems similar to one note.

  • @ankitrathore3238
    @ankitrathore3238 ปีที่แล้ว +3

    Understood. Thanks for the awesome tutorials 😄

  • @rohansirsa3501
    @rohansirsa3501 27 วันที่ผ่านมา

    I was asked how the map works in the backend in my recent interview but unfortunately I couldn't answer the question 😢😢
    now I understand thanks brother ❤

  • @ravisingh-el8np
    @ravisingh-el8np ปีที่แล้ว +28

    Code for homework :
    #include
    using namespace std;
    int main() {
    int a[] = {1,2,1,2,3,4,3,1};
    unordered_map < int, int > mpp;
    for (int i = 0; i < 8; i++) {
    mpp[a[i]]++;
    }
    int maxFreq = INT_MIN;
    int minFreq = INT_MAX;
    int maxEle = -1, minEle = -1;
    for (auto & e: mpp) {
    if (e.second > maxFreq) {
    maxEle = e.first;
    maxFreq = e.second;
    }
    if (e.second < minFreq) {
    minEle = e.first;
    minFreq = e.second;
    }
    }
    cout

    • @chandanbharti5207
      @chandanbharti5207 ปีที่แล้ว

      can u explain why u have initialized the max and min elements to be -1 ??

    • @nitinjaswal527
      @nitinjaswal527 ปีที่แล้ว

      @@chandanbharti5207 based on the elements in the array he also can take int min and int max

  • @coolbeats-mm1kp
    @coolbeats-mm1kp 3 หลายเดือนก่อน

    understood ! I am amazed with such deep explanation of concept and you hard work that you put in this playlist, again a big thank to you ❤❤

  • @harshal.rathore
    @harshal.rathore ปีที่แล้ว +5

    I like that "25 or 26" confused look 😂😂😂

  • @ce038_divanshsingh3
    @ce038_divanshsingh3 2 หลายเดือนก่อน +1

    Today Interviewer ask me the same question , how to implement Unordered_map , @striver NoBody is going to teach this , Its my fault that i did't revise this and unable to answer , but you are just ❤❤❤❤

  • @Tbm4545
    @Tbm4545 20 วันที่ผ่านมา +3

    Google i am not coming 😢

  • @harshraje516
    @harshraje516 ปีที่แล้ว +1

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

  • @ankitvarshney9966
    @ankitvarshney9966 ปีที่แล้ว +4

    #include
    Using namespace std;
    int main(){
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i>a[i];
    Unordered _mapm;
    for (int i=0;i

  • @ananya2289
    @ananya2289 4 หลายเดือนก่อน

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

  • @sid17_cgdyt
    @sid17_cgdyt ปีที่แล้ว +2

    superb striver ... Understood it very well

  • @velvet0221
    @velvet0221 9 วันที่ผ่านมา

    class Solution {
    public:
    // Function to count the frequency of all elements from 1 to N in the array.
    void frequencyCount(vector& arr, int N, int P) {
    unordered_mapmpp;
    for(int i = 0 ; i< arr.size(); i++){
    mpp[arr[i]]++;
    }
    for(int i=1;i

  • @ankit_tiwari2001
    @ankit_tiwari2001 4 หลายเดือนก่อน

    For python users
    def func(arr):
    d = {}
    for num in arr:
    if num in d:
    d[num] +=1 // if exists then 1+
    else: d[num] = 1 // if key doesn't exists then set value 1

  • @manavsingh5919
    @manavsingh5919 ปีที่แล้ว +1

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

  • @Hipfire786
    @Hipfire786 6 หลายเดือนก่อน

    understood everything explained wonderfully

  • @shivanand0297
    @shivanand0297 5 หลายเดือนก่อน

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

  • @GautamKumar-lv1gb
    @GautamKumar-lv1gb ปีที่แล้ว

    bhaiya ek choti si request like jb aap ye btate ho na ki unordered map h ya ordered to saath saath ek baar java k liye ek line bol dia kro baaki to google ho jaega...

  • @aryanpatel6490
    @aryanpatel6490 ปีที่แล้ว +1

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

  • @moonchild4632
    @moonchild4632 5 หลายเดือนก่อน

    Understood! you are such a fantastic teacher.

  • @simpy2965
    @simpy2965 ปีที่แล้ว +1

    Completely undestood bro thanks❤

  • @sanatanihinduharekrishna
    @sanatanihinduharekrishna ปีที่แล้ว +1

    understood everything, thank you sir.

  • @Pawankumar-i8c
    @Pawankumar-i8c 2 หลายเดือนก่อน

    understood everything bhiaya thanku so much for this lecture

  • @titangaming2470
    @titangaming2470 5 หลายเดือนก่อน

    I am doing DSA in javascript, do I need to learn cpp to use the concept of map and hashmap. so do it required in future course a lot? I am more comfortable in javascript than Cpp

  • @AbhishekSingh-xg3zj
    @AbhishekSingh-xg3zj 2 หลายเดือนก่อน

    Such an awesome explanation sir. Thank you for making such awesome video ❤

  • @abudeepa0474
    @abudeepa0474 หลายเดือนก่อน

    Understand brother .... thankyou so much striver ❤❤❤❤❤❤❤❤....

  • @shwetankdwivedi513
    @shwetankdwivedi513 ปีที่แล้ว +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.

  • @darshdj1698
    @darshdj1698 2 หลายเดือนก่อน +1

    pls make a video on implementaion of hashmap in java

  • @AmanPandey-zj1hd
    @AmanPandey-zj1hd ปีที่แล้ว +2

    understood bhaiya
    I am following your course
    Can you guide me how to perform in online coding assessment of any company because that questions are too different from these.and extremely hard also

    • @utkarshsharma6650
      @utkarshsharma6650 ปีที่แล้ว

      did you find any solution ? can you please share what solution is there for this?

  • @AYUSHSINGH-zq2po
    @AYUSHSINGH-zq2po 4 หลายเดือนก่อน +1

    Very well Understood !!

  • @purushottamreddy2664
    @purushottamreddy2664 หลายเดือนก่อน

    understand bro..very clear

  • @darkjokeryt9856
    @darkjokeryt9856 4 หลายเดือนก่อน

    understood, thankyou very much, we appreciate your efforts.

  • @utkarshtripathi7279
    @utkarshtripathi7279 ปีที่แล้ว +2

    understood everything

  • @gurmeetkumar6233
    @gurmeetkumar6233 2 หลายเดือนก่อน

    In java you can declare the array max size 10^8 locally globally both because java use heap memory not stack. right or wrong?

  • @jaisarita
    @jaisarita 8 หลายเดือนก่อน

    Awesome teaching style 👏🏼

  • @King_Dragon_Luffy
    @King_Dragon_Luffy ปีที่แล้ว

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

  • @sashikumarreddy9081
    @sashikumarreddy9081 ปีที่แล้ว

    understood. best channel for dsa.

  • @039puneethbatchu2
    @039puneethbatchu2 ปีที่แล้ว +1

    Understood... You are just amazing broo 💯💯

  • @thelearner4930
    @thelearner4930 7 หลายเดือนก่อน

    Understood bhaiya , thanks for this course!!

  • @niranjanniru4115
    @niranjanniru4115 4 หลายเดือนก่อน +1

    understood with strivers dsa