

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This document compares different implementations of the map data structure, including hashing, vector, sorted vector, and binary search tree (bst). It discusses the time complexity of getvalue and add operations, space used, and code complexity for each implementation. It also introduces the concept of hash functions, hash collisions, and chaining. The document concludes with a discussion on implementing a set using a balanced binary search tree abstraction.
Typology: Lecture notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Hash collisions
template <typename KeyType, typename ValType> class Map { public: Map(); void add(KeyType k, ValType v); ... };
Map<string, int> s; Map<int, Vector