Maps and Sets Study Guide
From charlesreid1
Definitions and Variations
Definitions
dictionary - data structure in which values are mapped to keys, or act as their own keys.
dictionary problem - a find/insert/delete lookup problem in which you learn nothing if your search fails
map - mathematical analog term for dictionary, like a function (one input gives one output)
sorted map - data structure storing keys in a sorted order to provide data in order
hash table - a fast, unordered lookup table that works by turning an object (key or value) into a unique slot in an array via a hashing function
hash code - maps keys to integers
compression function - maps integers to a set of slots 0..N-1
bucket array - array storing the data of the hash table
hash function - a function h that maps keys k to an integer between 0 and N-1, denoted h(k)
immutability - a property required of keys
collisions - when two unique/distinct objects have the same output of the has function $ h(k_i) = h(k_j), i \neq j $
chaining - technique to deal with collisions
exact search - lookups tell you nothing about nearby data
inexact search - (timestamps example) can use sorting to get context info, less than, greater than, subset, etc.
maxima sets - storing (x,y) points used to model a cost/performance tradeoff. (a,b) dominates (c,d) if a <= c and b >= d. (a,b) is maximum pair if not dominated by any other pairs.
skip lists - data structure for storing data in sorted order, high probability of O(log N) access, simpler to implement relative to balanced search trees
ADTs and Interfaces
Implementations
Algorithms for Operations
Complexity and Cost
OOP Principles
Flags
| Maps and Dictionaries Part of Computer Science Notes
Series on Data Structures
Maps/Dictionaries Maps · Maps/ADT · Maps in Java · Maps/OOP · Maps/Operations and Performance Map implementations: Maps/AbstractMap · Maps/UnsortedArrayMap · Maps/SortedArrayMap Dictionary implementations: Dictionaries/LinkedDict · Dictionaries/ArrayDict
Hashes Hash Maps/OOP · Hash Maps/Operations and Performance Hash Maps/Dynamic Resizing · Hash Maps/Collision Handling with Chaining Hash functions: Hash Functions · Hash Functions/Cyclic Permutation Hash map implementations: Hash Maps/AbstractHashMap · Hash Maps/ChainedHashMap
Skip Lists · Java/ConcurrentSkipList · Java implementations: SkipList
Sets Sets · Sets/ADT · Sets in Java · Sets/OOP · Multisets
|