Algorithms
and
Data
Structures

Spring 2021
course
site
-->

April 12

... start recording.

Last time I pointed you towards a lot of material on graphs, trees, how to get them into a computer, and how to search them.

Today we're going to be doing some coding work, practicing working with trees, graphs, and searching, in breakout rooms and all together. Please remind me to turn the recording on & off as we go.

I have some of my code in ../code/graphs ; we'll start from scratch and then look at some of that as needed.


vocabulary :

API choices :

tasks :


Here's what we'll start with :

We worked together through the attached tree_april12.py and graph_april12.py , which (a) store that graph into the code as a list of edges, (b) has a way to get children or neighbors, and (c) uses that to "search" through the whole tree or graph.

The homework for Thursday is basically these same tasks along with some explanations, on a different graph and tree.


I forgot to turn recording back on after our break, so the video only has the first part of today's class.

aside

https://cs.bennington.college /courses /spring2021 /algorithms /notes /graphs2
last modified Mon April 12 2021 5:35 pm

attachments [paper clip]

  last modified size
TXT graph_april12.py Mon Apr 12 2021 05:34 pm 3.2K