slides - Computer Science - University of San Francisco
slides - Computer Science - University of San Francisco
slides - Computer Science - University of San Francisco
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
17-61: Improved? Dijkstra TimeDon’t use priority queue, running time is Θ(V 2 )Do use a prioroty queue, running time is Θ(E lg E)Which is better?For dense graphs, (E ∈ Θ(V 2 )), Θ(V 2 ) is betterFor sparse graphs (E ∈ Θ(V )), Θ(E lg E) isbetter