Previous Lecture Lecture 9 Next Lecture

Lecture 9, Tue 04/30

Python Data Structures: List, Dictionary, Stack

Plan for today

Big-O iClickers

def print_pair(n):
  for i in range(n):
    for val in range(n):
      print(i, val)

for num in range(0, 1000):
  print_pair(num)

Big-O of O(1): the input to the print_pair function is constant

Lists

Dictionaries

Abstract Data Type

Linear Data Structures

Stacks