@w1024020103
2017-05-07T09:47:03.000000Z
字数 613
阅读 701
CS61B
Order of growth of Runtime:
G.adj(i)returns a Iterable(like a set, list etc)
runtime analysis:
Summary:
implementation:
Recursive method to check if s is connected to t:
Depth-first traversal definition:
good example for Depth-first Traversal:
B LEVEL:
1.
if we count .adj() as our cost model, runtime is Θ(V);
if we count .print(), runtime is Θ(E);
2.
注意一下啥叫tightest bound.
3.
3题和A LEVEL都不会