Stacks, Queues, and Deques
Explore Basic Abstract Data Types
Exploration
Read chapters 6 and 7 in A First Course on Data Structures in Python Try out the implementations of Stack
,Queue
, andDeque
in theds2
package of donsheehy/datastructures. Can you write your own tests cases for these data structures? Can you use these data structures in your own program?Note that, along with chapter 8, chapter 7 will again be the focus for next week
Activities
Monday and Wednesday: Stacks, Queues, and Deques - Explore the concept of an abstract data type (ADT)
- Understand implementation trade-offs for stacks, queues, and deques
- Use asymptotic analysis to characterize performance of an ADT
- Enhance an ADT implementation with useful exception handling
- Examine Python source code segments to illustrate key points
Thursday: Continue algorithm engineering project Friday: Planning for next algorithm all-hands project
Project
Goal
To build and use a Python program, called filesorter
, that runs benchmarks to study the performance of sorting different types of data stored in a CSV file.
Steps
- Use File Sorting as your template repository
- Install the project’s dependencies using
devenv
- Follow the instructions to complete the project:
- Week 1: Implement all of the modules in
filesorter
- Week 2: Design and conduct experiments and document experimental results
- Week 1: Implement all of the modules in
- Schedule office hours if you have questions