Skip to content

Commit

Permalink
madison metro data
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerharter committed Feb 9, 2020
1 parent 148f367 commit 6794818
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion s20/lab4/README.md
Expand Up @@ -2,7 +2,7 @@

Start a new notebook on your virtual machine, then complete the two parts of the lab:

1. learn about [linked lists](part1.md) -- this is good practice to prepare for the next topics in the course, trees and grahps
1. learn about [linked lists](part1.md) -- this is good practice to prepare for the next topics in the course, trees and graphs
2. learn about [zipped data](part2.md) -- for P2 (released after this lab), we'll ask you to analyzed data directly in a zip file, without unzipping first; you'll practice that here

Have fun, and let us know if you have any questions!
13 changes: 12 additions & 1 deletion s20/lab4/part1.md
Expand Up @@ -215,4 +215,15 @@ B occurs 2 times
D occurs 1 times
```

Pretty cool, huh?
We get two useful methods, `.index(...)` and `.count(...)` by only
adding one parent class. Pretty cool, huh?

## Concluding Thoughts

Although we were able to implement something that works somewhat like
a Python list, it wouldn't be a good idea to use our version as is.
With a regular Python list, index lookups to the last items (like
`L[-1]`) are fast -- they have O(1) complexity. Although
`__getitem__` doesn't use a loop, the recursion still need to go
through every node to find the last one, so `L[-1]` is an `O(N)`
operation for our version of the list -- ouch.
Binary file added s20/p2/mmt_gtfs.zip
Binary file not shown.

0 comments on commit 6794818

Please sign in to comment.