main page  —  CS 566 Efficient Algorithms

Unit 3: Fundamental Data Structures

This unit covers fundamental data structures:

  • stacks, queues, and resizable arrays
  • priority queues and binary heaps
  • binary search trees
  • hash tables

Learning outcomes

  1. Understand and demonstrate the difference between abstract data type (ADT) and its implementation
  2. Be able to define the ADTs stack, queue, priority queue and dictionary/symbol table
  3. Understand array-based implementations of stack and queue
  4. Understand linked lists and the corresponding implementations of stack and queue
  5. Know binary heaps and their performance characteristics
  6. Understand binary search trees and their performance characteristics
  7. Know high-level idea of basic hashing strategies and their performance characteristics
  8. Know the definition and examples of universal hashing.

Material

About this unit

The goal of this unit is twofold: (1) to bring you all on the same page regarding some basics usually covered in a first algorithms and data structures module such as Algorithms and Data Structures; (2) present some more advanced analyses and concepts often left out of such a module.

For the basic recap on stack, queues, binary heaps and binary search trees, if you have never seen the material before, the brief summary I give in the context of this module will not suffice to replace a full first algorithms module. You are highly encouraged to learn more in depth about these gems of computer science. The material below for further reading and sources will help you get started.

Further reading and sources

The sections on stacks, queues, and symbol tables follow the book

The presentation of resizable arrays (including deamortized and optimal-space versions), priority queues and heaps is my own. The amortized analysis of the resizable arrays is spelled out in detail in my blog post:

The hashing summary follows our book, which (like Sedgewick and Wayne) has complete Java implementations of the discussed data structures.

For a lovely illustration of how memory management and pointers can be implemented conceptually, I recommend this:


Unit 2  ⋅  Syllabus  ⋅  Unit 4