Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 1.06 KB

File metadata and controls

24 lines (13 loc) · 1.06 KB

You Don't Know Graphs

But after this, you will.

In this assignment, you will engage in a test-driven development process to implement a graph. We'll call it a "Graph."

Run the Test Suite

Run the tests:

python3 -m unittest test_graph

Open the test and implementation files (eg test_graph.py and graph.py) in your editor of choice. Modify the implementation to pass the first test. After each test passes, create a commit. Then, uncomment the next test, and re-run the test suite. Implement what's necessary to pass the test, and then repeat this process.

But wait!

Toward the middle of the test suite, you should be thinking about the algorithmic efficiency of each operation. What should be O(1)? What should be O(|E|) or O(|V|)? In addition, try to implement your operations using recursion, whenever possible.

Best Done in Pairs!

Get together with a friend in front of just one machine, and take turns being the driver. Change drivers after each test is passed. Don't forget to commit after each test.

(c) 2019 Yong Joseph Bakos. All rights reserved.