Skip to content

Files

Latest commit

 

History

History

topic_03_queue

topic 03: queues + more runtime analysis

Announcements:

  1. Good job collaborating during lab time

  2. Grades up-to-date in sakai

  3. Lots of students still haven't submitted the first assignment

    there's no late penalty

    but you're officially behind

Lecture

  1. queue ADT
    1. in python, always implemented using deques (pronounced "decks")

      from collections import deque
      
    2. interface:

      1. enqueue: add something to the top; in python, we use the append method; same as stacks/lists
      2. dequeue: take something off the bottom; in python, we use the popleft method; different from stacks/lists
    3. the differences between a stack and queue are summarized by

      1. stack = FILO (first in last out)

      2. queue = FIFO (first in first out)

    4. Reference: textbook chapter 4

Lab

Posted at https://github.com/mikeizbicki/lab-timit.