Hash table open addressing

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

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

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

    Awesome videos man.
    Your explanations are crystal clear and i'm super greatful for your work

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

    Great videos man , i really love your data structures videos . Please also make videos on solving competitive coding problems (like you did previously on some code jam problems) after data structures series.

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

    Hello William, I always handled my issues with Seperate Chaining Hashing method , could you tell me why we may need open addressing method anyway?

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

      look at the graph at the beginning of the video, it could potentially be faster when load factor is small

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

    thank you very much

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

    learning a lot thanks

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

    How can there be a cache miss in a hash table? could you clarify more more about y-axis of the graph shown @2:43?

    • @WilliamFiset-videos
      @WilliamFiset-videos  6 ปีที่แล้ว +6

      Anuruddha Premalal It's showing the amount of times you are likely to probe when you encounter a hash Collision as the number of elements in your hash table increases for two different hash Collision resolution techniques. This is correlated to Cache misses Since you have to do more lookups.

  • @ashrafmohamed6251
    @ashrafmohamed6251 3 ปีที่แล้ว

    @williamFiset why not using a data structure to store the free slots in the hashtable array, and maintain this data structure when a slot get used, or the capacity of the hashtable get increased, so at any point if a hash value (index) is used, we look for the first element in the freeSlot Data structure and use it, then update the freeSlot Data structure to flag that, this element is now in use, etc. I did not try this idea, but is it right conceptually?

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

      I think its because you'd still end up checking it by a value. A data structure stores data, but it itself is not the data. You would still end up trying to access the data to check it. If this doesn't make sense, give me an example of a data structure so I can help explain it.

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

      I would also. like to add, data structures can be stored in an empty slot, but to check if it is empty, you'd have to use a value. Also, what data structures did you have in mind?

  • @bernardopankaarchegas8007
    @bernardopankaarchegas8007 2 ปีที่แล้ว

    great vid

  • @timel0rd57
    @timel0rd57 2 ปีที่แล้ว

    Why can't you just make the size of the hash table , n, a prime number, p , then a linear P with a multiple less than p can't create a cycle?

  • @adamhendry945
    @adamhendry945 4 ปีที่แล้ว

    @WilliamFiset Is chaining at least 2 cache misses as shown at @2:00 because of the overhead of accessing the first entry in the linked list (i.e. going from bucket to entry), as demonstrated here (th-cam.com/video/ZDyv__yfTKs/w-d-xo.html)? For implementations with list head cells, wouldn't the speed be the same as linear probing?

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

    Where did my comment go

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

    Oh this is a different video lol hahahaha ha my bad lol haha