Chapter 20 Further Reading
Official Documentation
-
Python
collections.dequeDocumentation https://docs.python.org/3/library/collections.html#collections.deque The complete reference for Python's double-ended queue. Coversappend,appendleft,pop,popleft,rotate,maxlen, and more. Thedequeis the standard Python tool for implementing both queues and stacks when you need thread-safe operations or O(1) operations at both ends. -
Python
queueModule Documentation https://docs.python.org/3/library/queue.html Python's thread-safe queue implementations:Queue(FIFO),LifoQueue(stack), andPriorityQueue. These are designed for concurrent programming (multiple threads sharing data) — a topic you'll encounter in more advanced courses. Compare their interfaces to the classes we built in this chapter. -
Python
heapqModule Documentation https://docs.python.org/3/library/heapq.html A priority queue implementation using a binary heap. Items are always dequeued in priority order (smallest first). This is the data structure behind task schedulers that prioritize urgent items — a step beyond the simple FIFO queues in this chapter.
Conceptual Deep Dives
-
"Data Structures and Algorithms in Python" by Goodrich, Tamassia, and Goldwasser (Wiley, 2013) Chapters 6 (Stacks, Queues, Deques) and 7 (Linked Lists) cover the same material as this chapter with full implementations and mathematical analysis. This is a standard CS2 textbook and an excellent next step after this course.
-
Visualgo — Visualizing Data Structures https://visualgo.net/en Interactive visualizations of stacks, queues, linked lists, trees, graphs, hash tables, and more. Watch operations happen step by step with animation. Particularly useful for building intuition about linked lists and trees before implementing them.
-
CS50 — Data Structures (Harvard) https://cs50.harvard.edu/x/ Week 5 of Harvard's CS50 covers data structures (linked lists, trees, hash tables, tries) in C. Even if you don't know C, the lecture videos provide excellent conceptual explanations with physical demonstrations and animations.
Stacks and Queues in Practice
-
"The Call Stack" — MDN Web Docs https://developer.mozilla.org/en-US/docs/Glossary/Call_stack While written for JavaScript, this explanation of the call stack applies to every language including Python. Understanding the call stack deepens your understanding of function calls, recursion, and stack overflow errors.
-
Shunting Yard Algorithm (Wikipedia) https://en.wikipedia.org/wiki/Shunting-yard_algorithm Dijkstra's algorithm for parsing mathematical expressions using a stack. It converts infix notation (
3 + 4 * 2) to postfix notation (3 4 2 * +). The algorithm is elegant and surprisingly practical — it's used in calculators, spreadsheets, and compilers. -
BFS and DFS Visualized — Interactive Tutorial https://www.redblobgames.com/pathfinding/a-star/introduction.html Red Blob Games provides beautiful interactive visualizations of BFS, DFS, Dijkstra's algorithm, and A* pathfinding. The BFS section directly extends the queue-based shortest path example from Section 20.5. Highly recommended for visual learners.
Operating Systems and Scheduling
-
"Operating Systems: Three Easy Pieces" (OSTEP) https://pages.cs.wisc.edu/~remzi/OSTEP/ A free, excellent operating systems textbook. Chapters 7-9 cover CPU scheduling in detail — FCFS, Round Robin, multilevel feedback queues, and more. This directly extends Case Study 2 and provides the theory behind why your computer can run dozens of programs "simultaneously."
-
"Convoy Effect in Operating Systems" — GeeksforGeeks https://www.geeksforgeeks.org/convoy-effect-in-operating-systems/ A focused explanation of the convoy effect — when short processes get stuck behind long ones in FCFS scheduling. Includes examples and comparisons with other scheduling algorithms.
Abstract Data Types and Software Design
-
"Abstract Data Types" — Wikipedia https://en.wikipedia.org/wiki/Abstract_data_type A comprehensive overview of ADTs, their history, and their role in software engineering. The formal definitions connect to programming language theory and type systems — deeper than we went in this chapter, but valuable for understanding why ADTs matter beyond this course.
-
"Design Patterns: Elements of Reusable Object-Oriented Software" by Gamma et al. (1994) The seminal "Gang of Four" book. ADTs are a precursor to design patterns — both are about separating interface from implementation. If the ADT concept resonated with you, design patterns take the same philosophy further. The Iterator, Strategy, and Observer patterns are particularly relevant to data structures.
Going Deeper
-
Linked List Implementation in Python — Real Python https://realpython.com/linked-lists-python/ A thorough tutorial on implementing singly and doubly linked lists in Python. If you want to build a full linked list (not just understand the concept), this is the best Python-specific resource available.
-
"Introduction to Algorithms" by Cormen, Leiserson, Rivest, and Stein (CLRS) The standard algorithms textbook used in CS2 and beyond. Chapters 10-12 cover elementary data structures (stacks, queues, linked lists, trees). Dense but comprehensive — this is the book that will take you from understanding data structures to mastering them.