Algorithms
and
Data
Structures

Spring 2021
course
site
-->

March 29

... start recording

Questions about anything?

Context - where are we and what's next ?

... check out and discuss the wiki page .

This week - hash tables

Here are some resources :

This is an important data structure, a staple for fast lookup. There are many variations with various tradeoffs for different situations. Your goal is to understand the basic idea and to to explore it a bit with some code.

Key ideas to discuss before we start working on this :

I have some code in code/hash_table to get us going.

I've also uploaded a classic word_count.py hash table task that we may discuss.


We didn't do breakout rooms. Instead I started to write a kludgy hash table implementation, but didn't get very far. We did talk a little about lists within lists as a way to handle collisions, putting all (key,value) pairs with the same hash value into the same bucket (which is a list). But as those buckets get bigger, the performance of the hash table degrades.

The assignment for now is to read about hash tables so that we can come back on Thursday and work on some code together.

https://cs.bennington.college /courses /spring2021 /algorithms /notes /hashlab1
last modified Mon March 29 2021 5:01 pm