CMP 338 Summary
- binary search
- stacks and queues
- definitions
- linked list implementation
- array implementation and dynamic resizing of arrays
- disjoint union/find
- array implementation
- map/set implementation and lazy map initialization
- weight balanced unions
- path compression on finds
- sorting algorithms
- comparison sorts
- insertion sort
- merge sort
- quicksort
- selection algorithms
- quick select
- linear select
- heap sort and priority queues
- radix sorts
- key-indexed counting
- LSD (least significant digit) string sort
- MSD (most significant digit) string sort
- three-way string quicksort
- symbol tables
- unordered symbol tables
- operations
- void put(Key k, Value v)
- Value get(Key k)
- void delete(Key k)
(assume: delete(Key k) {put(k, null);})
- boolean contains(Key k)
- boolean isEmpty()
- int size()
- Iterable keys()
- sequential search symbol tables
- hash tables
- Java hashCode() and hash methods
- collision resolution
- separate chaining (closed-addressing)
- linear probing (open-addressing)
- ordered symbol tables
- operations
- all unordered symbol table operations
- Key min()
- Key max()
- Key floor(Key k)
- Key ceiling(Key k)
- int rank(Key k)
- Key select(int n)
- void deleteMin()
- void deleteMax()
- Iterable<Key> keys(Key lo, Key hi)
- binary search trees
- 2/3 trees
- left-leaning red/black trees
- Node rotateLeft(Node n)
- Node rotateRight(Node n)
- void flipColors(Node n)
- void put(Key k, Value v)
- void delete(Key k)
- symbol tables with String keys
- operations
- all ordered symbol table operations
- String longestPrefixOf(String s)
- Iterable<String> keysWithPrefix(String s)
- Iterable<String> keysThatMatch(String pattern) // periods in pattern match any char
- tries
- ternary search tries (TST's)
- graph algorithms
- kinds of graph
- undirected
- directed
- directed acylic graphs (DAG's)
- edge-weighted undirected graphs, directed graphs, DAG's
- implementations
- array based
- map/set based
- depth-first search
- breadth-first search
- topological sort
- minimum spanning tree (undirected graphs)
- Prim
- Kruskal
- shortest path
- breadth-first search (undirected graphs)
- Dijkstra (edge-weighted directed or undirected graphs with non-negative edge weights)
- topological sort (edge-weighted DAG's)
- Belman-Ford (edge-weighted directed graph, no reachable negative cycles)
- intrastring search
- substring search
- brute force
- Knuth-Morris-Pratt
- Boyer-Moore
- Rabin-Karp (fingerprint)
- matching regular expressions
- data compression
- run-length coding
- Huffman coding
- Lemple-Ziv coding
- arithmetic coding
- dynamic programming
- P and NP
- What does it mean for a problem to be in P?
- What does it mean for a problem to be in NP?
- What does it mean for a problem to be NP-complete?