Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| courses:cs211:winter2012:journals:garrett:entries:week_4 [2012/02/15 04:58] – added homework corrections garrettheath4 | courses:cs211:winter2012:journals:garrett:entries:week_4 [2012/02/15 05:06] (current) – garrettheath4 | ||
|---|---|---|---|
| Line 28: | Line 28: | ||
| **(b)** The running time of the algorithm is also Ω(n^3) because there are no shortcuts in the algorithm, each for loop runs to completion without skipping any indices as the algorithm progresses. | **(b)** The running time of the algorithm is also Ω(n^3) because there are no shortcuts in the algorithm, each for loop runs to completion without skipping any indices as the algorithm progresses. | ||
| + | ==== Problem Set 3 ==== | ||
| + | === Problem 2 === | ||
| + | The algorithm is O(m+n) because each node and edge must be visited once. As the algorithm progresses, the nodes and edges are stored in memory and the algorithm reports a cycle if it comes across a node again. | ||
| ~~DISCUSSION~~ | ~~DISCUSSION~~ | ||
| + | |||
