Course Hero Logo

F 5 an algorithm that runs in o2n runs faster than

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 3 out of 6 pages.

F5.An algorithm that runs inO(2n)runs faster than another version that runs inO(4n).TF6.Everyfullbinary tree is also acompletebinary tree.
F7.Twice the length of a minimum spanning tree (MST) is an upper bound on the Traveling
Salesman Problem (TSP).F8.Prim’s algorithm guarantees a minimum length solution, but Kruskal’s algorithm does not.
F9.For any graph, a Minimum Spanning Tree (MST) can always be found using a greedy
algorithm.TF10.To calculate the shortest path from one node to all others in an unweighted graph we can usea breadth-first traversal.F12.Given a min heap with more than two values, we can always find thetwosmallest values in
a min heap in constant time.
13.The following code using an explicit stack will displaytheNumberequivalent in binary,
with the digits in the correct order.An Eulerian walk is a trail in a graph which visits each edge exactly once.14.There is a Eulerian walk for the following graph:
F15.There is a Eulerian walk for the following graph:
TF16.A heap ofnelements stored using an array representation in an array of sizentakes less
storage than an equivalently sized linked representation.
CS 251, Midterm #2, Spring 2015page 2

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 6 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
Graph Theory, E C F D G, C D H G E G, C D H G E F

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture