If anyone is following the playlist sequentially and is not sure what William means by Load Factor. Fear not! He explains it in the next video. Load Factor = number of elements (key/value pairs) in Hash Table / Size of Hash Table ( equal to the number of unique indices)
@yuminwu6320 Жыл бұрын
Thanks! Was going back through all the hash table videos to see if I've missed it lol
@daumtto Жыл бұрын
Thanks.
@youssifessam81252 жыл бұрын
Hi William, can I know why hashing a string in java takes linear time as you said in this video?
@ranawareviraj Жыл бұрын
Thanks William..!
@scottzeta30672 жыл бұрын
I am confused with this part LinkedList links = table[bucketIndex]; links.remove(entry); Is this only going to remove the entry in the List links but not remove the entry in the table?
@scottzeta30672 жыл бұрын
Well, I think I might figure it out. The List is actually a memory address which contain the elements (if print it directly without toString(), it will show the memory address), so another list assign to the previous one will also point to the same memory address.
@whatz1861 Жыл бұрын
Maybe trying to insert some data and showing the output would help more
@gamer228876 жыл бұрын
Do you know how to write a function that would print out the hashtable along with the indexes (including the spots where it would say null)? Something like 0:null 1:China, Japan 2:Canada 3:null 4:Germany
@WilliamFiset-videos6 жыл бұрын
See 11:04 I skimmed that very quickly. The function "values()" should be able to help you out I think :)
@WilliamFiset-videos6 жыл бұрын
I'm able to iterate over the table like that in the function because I implemented Java's Iterable interface for the hashtable.