## COMP 2140 - Data Structures and Algorithms

I taught COMP 2140 during the summer of 2012. I really enjoyed this particular class as an undergraduate, and in hindsight consider it to be one of the most useful intro-level computer science classes I've ever taken.

The class can vary quite a bit from year-to-year, depending on the instructor's personal preferences. Some instructors put much more emphasis on the analysis of data structures and their efficiency relative to other structures. Others prefer to focus more on the implementation and use of these structures, and give less emphasis on the mathematical analysis of these concepts. Personally, I find myself in the latter camp, and the lecture slides below mirror this approach.

Specific data structures covered in the course are:

- Linked lists
- Stacks
- Queues
- Heaps
- Binary trees
- Hash tables

### Current Lecture Notes

Are you here because of my sample lecture? Well, you're in luck! Below are the lecture slides used in class along with the complete sample programs.

The sample programs are written for Python 2.7, but will also work with Python 3.

### Previous Years' Lecture Notes

- ROASS
- Introduction
- Recursion
- Bubble Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Radix Sort
- Counting Sort
- Linked Lists
- Abstract Data Types
- Queues
- Stacks
- Tables
- Trees
- Tree implementation with arrays
- 2-3 Trees
- 2-3 Tree deletion
- Heaps
- Heapsort
- Sparse Matrix
- Graphs
- Quad-Trees and Flexible Binary Space Partitioning
- Red-Black Trees, Skip-Lists
- Algorithm Analysis 1
- Algorithm Analysis 2