You should be able to:
- Define and distinguish Abstract Data Types (ADT) and Data Structures (DS)
- Describe how both a stack and a queue work (how are they different, what similarities do they have, etc)
- Implement a Linked List and Binary Search Tree (BST) class
- Explain the high-level differences between depth-first and breadth-first search
- Explain the differences between pre-order, in-order, and post-order processing
| ADT | DS | |
|---|---|---|
| Contiguous Array | ☑️ | |
| Stack | ☑️ | |
| Queue | ☑️ | |
| List | ☑️ | |
| Tree | ☑️ | |
| Linked List | ☑️ |
Overview:
- Abstract Data Type (ADT) – It's a blueprint of expected operations and how information is related.
- Data Structure (DS) – It's an actual implementation of how information is stored memory.
| Stack | Queue | |
|---|---|---|
| Enqueue | ☑️ | |
| Dequeue | ☑️ | |
| Push | ☑️ | |
| Pop | ☑️ |
| Breadth First Search | Depth First Search | |
|---|---|---|
| Traverses tree level by level | ☑️ | |
| Traverses tree branch by branch | ☑️ | |
| Good for copying a BST | ☑️ | ☑️ (pre-order) |
Reference:
| Pre-order (root, left, right) |
Post-order (left, right, root) |
In-order (left, root, right) |
|
|---|---|---|---|
| Produces a sorted list of items from a BST | ☑️ | ||
| Remove all tree nodes from memory | ☑️ | ||
| Clone a binary search tree | ☑️ |