The readings for Monday, October 24 are:
Data Structures and Other Objects Using C++:
If you do not have the primary textbook, you can use the following free alternative texts instead:
Data Structures & Algorithm Analysis
The focus of the reading is hash tables, specifically the separate chaining implementation strategy.
Once you have completed the readings, answer the following questions in the
reading07/README.md
file in your assignments repository:
In the context of hash tables, what is the purpose of a hash function? That is, what is is used for?
In the context of hash tables, what exactly is a collision? How are collisions handled in a hash table that uses separate chaining?
In the context of hash tables, what constitutes a good hash function? That is, what sort of properties would we want in the hash function used in our implementation of a hash table?
For a hash table using separate chaining (ie. with lists for buckets), identify the average and worst case time complexities in terms of Big O for the following set operations:
Search
Insert
Remove
If the average and worst case time complexities are different, then explain the reason for the difference.
To submit your solution, you must initiate a Merge Request in your private assignments repository and assign it to the appropriate TA from the Reading 07 - TA assignment list.
To facility the Merge Request workflow, you must do your development in its own branch:
$ cd path/to/repo # Go to your repository $ git checkout master # Make sure we are on master branch first $ git pull # Make sure we have changes from GitLab $ git checkout -b reading07 # Create reading07 branch ... # Do your work $ git commit # Commit your work (can do this multiple times) $ git push -u origin reading07 # Push branch to GitLab