Extendible Hashing - Exercise - Data Structures

Поделиться
HTML-код
  • Опубликовано: 24 окт 2024
  • In this video I practice adding random keys to an extendible hashing framework.

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

  • @AshutoshMehra-jx9eb
    @AshutoshMehra-jx9eb Год назад +2

    This is the best video on Extendible Hashing on RUclips. Covers everything correctly and efficiently.

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

    Thank you for your patient explanation! It saved much of my time.

  • @chernoBill92
    @chernoBill92 4 года назад +3

    Very well explained. Thanks a lot! This might save me some trouble in the exam today.

  • @hdrkn5247
    @hdrkn5247 2 года назад +2

    I like that your demonstration starts from an empty hash table. But what happens if the first 4 elements in the first bucket are all odds and you're trying to add a 5th odd element to the hash table? Thanks.

    • @chrismarriott-CS
      @chrismarriott-CS  2 года назад +1

      We will split the bucket. All five will end in the odd bucket and we will split again. We keep doing this until we split the elements into two buckets or we reach the maximum size of the table.

    • @hdrkn5247
      @hdrkn5247 2 года назад

      @@chrismarriott-CS Okay, so it could take multiple splits for the new pair to be inserted. Thanks again!

  • @alek0245
    @alek0245 3 года назад +3

    What happened to 26? Should that not be placed in the first bucket after you split it?

    • @chrismarriott-CS
      @chrismarriott-CS  3 года назад +2

      It belongs in the bottom bucket with 14, 2 and 30 after the split (since this bucket ends 10).

    • @alek0245
      @alek0245 3 года назад +1

      @@chrismarriott-CS ahh ye I see, thx for the answer.

  • @YiyangChen-y8d
    @YiyangChen-y8d 4 месяца назад +1

    Thank you so much.

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

    what if we have to delete the values from the hash table?how will that effect the local depth?

    • @chrismarriott-CS
      @chrismarriott-CS  Год назад

      There are two answers to this: First, hash tables tend to grow more than shrink, so often we do nothing special when we delete. We just delete. However, if we want to shrink the table as well as grow it, we can do every operation, just in reverse. Splits, become merges (find the split image and merge it), and directory grows become directory shrinks if the global depth exceeds all local depths.

    • @JaspreetSingh-bd4zo
      @JaspreetSingh-bd4zo 10 месяцев назад

      if after deletion there is nothing in the bucket, you need to combine them back

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

      @@JaspreetSingh-bd4zo okk Jessica!

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

    great video ! but at around 12:00 , you made a split. I didn't get how can we select how to split the pointers between the old bucket and the new one. can you help please

    • @chrismarriott-CS
      @chrismarriott-CS  6 месяцев назад

      We are using mod 4 to move the entries into the 0 or 2 bucket.

  • @Girish-si6kc
    @Girish-si6kc 9 месяцев назад +1

    thank you :D

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

    thank you :)