4. Trees and hierarchical orders
Before we proceed with looking at data structures for storing linearly ordered data, we must take a diversion to look at trees. At first glance, it appears as if trees are most appropriate for storing hierarchically ordered data; however, we will later see how trees can also be used to allow efficient storage of linearly ordered data, as well.
4.1 | Introduction to trees | pptx | pdf | V | Q | - | W | D | - |
4.2 | Abstract trees | pptx | pdf | V | Q | - | W | - | - |
4.3 | Tree traversals | pptx | pdf | V | Q | - | W | D | - |
4.4 | Parental trees | pptx | - | - | - | - | Optional | W | - | - |
4.5 | Forests | pptx | - | - | - | - | Optional | W | - | - |
4.6 | The mechanism of recursion, part 1 | pptx | - | - | - | - | Optional | W | - | - |
5. Ordered trees
A general tree is appropriate for storing hierarchical orders, where the relationship is between the parent and the children. There are many cases, however, where the tree data structure is more useful if there is a fixed number of identifiable children. This topic looks at binary trees as well as perfect and complete binary trees, N-ary trees, the concept of balance, binomial trees, and left-child right-sibling binary trees (a technique for storing general trees as binary trees).
5.1 | Binary trees | pptx | pdf | - | Q | A | W | D | - |
5.2 | Perfect binary trees | pptx | pdf | - | Q | A | W | D | - |
5.3 | Complete binary trees | pptx | pdf | - | Q | A | W | D | - |
5.4 | N-ary trees | pptx | pdf | - | Q | A | W | D | - |
5.5 | Balanced trees | pptx | pdf | - | Q | A | W | D | - |
5.6 | Binomial trees | pptx | - | - | - | - | Optional | W | D | - |
5.7 | Left-child right-sibling binary trees | pptx | - | - | - | - | Optional | W | D | - |
6. Search trees
This topic looks at storing linearly ordered data in search trees. The focus is to ensure that operations on individual elements stored in the tree run in Θ(ln(-)) time.
6.1 | Binary search trees | pptx | pdf | - | Q | A | W | D | - |
6.2 | AVL trees | pptx | - | - | - | - | W | D | - |
6.3 | In-order traversals | pptx | pdf | - | Q | A | W | D | - |
6.4 | Multiway search trees (was M-way trees) | pptx | pdf | - | Q | A | - | D | - |
6.5 | B+ trees | pptx | - | - | - | - | W | D | - |
6.6 | Red-Black trees | pptx | - | - | - | - | Optional | W | D | - |
6.7 | k-d trees | pptx | - | - | - | - | Optional | W | D | - |
6.8 | BB[α] trees | pptx | - | - | - | - | Optional | - | D | - |
6.9 | Splay trees | pptx | - | - | - | - | Self study | W | D | - |
6.10 | Average depth of random binary trees | pptx | - | - | - | - | Optional | W | - | - |
7. Priority queues
A priority queue stores linearly ordered data based on the priority; however, by restricting the operations, those operations can be optimized.
7.1 | Priority queues | pptx | pdf | - | Q | - | Español | W | D | C |
7.2 | Binary heaps | pptx | pdf | - | Q | - | Español | W | D | - |
7.3 | d-ary heaps | pptx | - | - | - | - | Optional | W | D | - |
7.4 | Leftist heaps | pptx | - | - | - | - | Optional | W | D | - |
7.5 | Skew heaps | pptx | - | - | - | - | Optional | W | - | - |
7.6 | Binomial heaps | pptx | - | - | - | - | Optional | W | D | - |
8. Sorting algorithms
9. Hash functions and hash tables
Note that previously I used to teach linear probing and double hashing; however, it has been brought to my attention that quadratic hashing is better—especially when we consider the effects of caching and the additional cost of cache misses.
9.1 | Introduction to hash tables | pptx | pdf | - | - | - | W | D | - |
9.2 | Hash functions | pptx | pdf | - | Q | - | W | D | - |
9.3 | Mapping down to 0, . M − 1 | pptx | pdf | - | Q | - | W | - | - |
9.4 | Chained hash tables | pptx | - | - | Q | - | W | D | - |
9.5 | Scatter tables | - | - | - | - | - | - | - | - |
9.6 | Open addressing | pptx | - | - | Q | - | W | D | - |
9.7 | Linear probing | pptx | - | - | Q | - | W | D | - |
9.8 | Quadratic probing | pptx | - | - | - | - | W | D | - |
9.9 | Double hashing | pptx | - | - | Q | - | Optional | W | D | - |
9.10 | Poisson distribution | pptx | - | - | - | - | Optional | W | - | C |
10. Equivalence relations and disjoint sets
10.1 | Disjoint sets | pptx | - | - | - | - | Self study | W | D | - |
10.2 | Trees and forests as disjoint sets | pptx | - | - | - | - | - | - | - |
10.3 | Partition refinement | - | - | - | - | - | W | D | - |
11. Graph algorithms
12. Algorithm design
12.1 | Introduction to algorithm design techniques | pptx | - | - | - | - | W | - | - |
12.2 | Greedy algorithms | pptx | - | - | - | - | W | D | - |
12.3 | Divide-and-conquer algorithms | pptx | - | - | - | - | W | D | - |
12.4 | Dynamic programming | pptx | - | - | - | - | W | D | - |
12.5 | Backtracking algorithms | pptx | - | - | - | - | W | D | - |
12.6 | Branch-and-bound algorithms | - | - | - | - | Optional | W | D | - |
12.7 | Stochastic algorithms | pptx | - | - | - | - | W | D | C |
13.1 | Theory of computation | pptx | - | - | - | - | W | D | - |
13.2 | Turing completeness | pptx | - | - | - | - | W | D | - |
13.3 | Decidability and the halting problem | pptx | - | - | - | - | W | D | - |
13.4 | NP completeness | pptx | - | - | - | - | W | D | - |
14. Other topics
14.1 | Sparse matrices | pptx | - | - | - | - | Optional | W | D | - |
14.2 | Searching algorithms | pptx | - | - | - | - | Optional | W | D | - |
14.3 | Standard Template Library (STL) summary | pptx | - | - | - | - | Optional | W | - | - |
15. Concluding remarks
15.01 | Summary and conclusions | pptx | - | - | - | - | W | D | - |
Algorithms and Data Structures
Department of Electrical and Computer Engineering
University of Waterloo
200 University Avenue West
Waterloo , Ontario , Canada N2L 3G1
- Feedback
- Faculty of Engineering
- Privacy statement
- © 2012 University of Waterloo