---- v65_hash_table_intro.mkv Arrays are O(1) So all we need is an index Can we make one? Hash functions: Make an index for our table Kinda depends on data type We'll do one for strings Collisions: Linear Chaining Other chaining strategies Separate chaining Eventually, the table may need to be resized ---- v66_location_entity_hash.mkv Suppose we have some kind of game, and want to map locations to entities If there's nothing there, we'll return "Not found" Location matching will be approximate! Nearby locations all hash to the same entry Hash function: (we adjusted it to be worse) h(x, y, z) = 13 * round(x) + 23 * round(y) + round(z) Linear chaining for this table ---- v67_hash_table_key_value.mkv Example from Spring 2024 of a key/value hash table In s24examples/hash_table ---- v68_hash_table_game_engine_example.mkv Using a hash table to eliminate duplicate vertices Lots of triangles in a 3D structure share vertices We can eliminate these by putting unique vertices in an array Then store indices into this array Hash function is required for vertices