Announcements:
-
Good job collaborating during lab time
-
Grades up-to-date in sakai
-
Lots of students still haven't submitted the first assignment
there's no late penalty
but you're officially behind
- queue ADT
-
in python, always implemented using deques (pronounced "decks")
from collections import deque
-
interface:
enqueue
: add something to the top; in python, we use theappend
method; same as stacks/listsdequeue
: take something off the bottom; in python, we use thepopleft
method; different from stacks/lists
-
the differences between a stack and queue are summarized by
-
Reference: textbook chapter 4
-
Posted at https://github.com/mikeizbicki/lab-timit.