This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 879, 572, 434, 111, 242, 811, 102} 5. (10 points) Show each step of sorting {3, 1, 4, 1, 5, 9, 2, 6} using mergesort. 6. (10 points) Find a topological ordering of the graph below. Show your steps. 2 7. (15 points) Shortest paths for weighted and unweighted graphs: (a) Find the shortest weighted path from vertex A to all other vertices (b) Treat the below graph as unweighted, find the shortest unweighted path from B to all other vertices. 8. (15 points) (This is a programming assignment). Implement bubble sort algorithm. Please submit your C++ program, your inputs, and your output which should print out the each step during sorting of your inputs. You can try to make up inputs with size 10 elements in it....
View
Full Document
 Spring '10
 JenniferChen
 Insertion Sort, Computational Algorithms and Data Structures

Click to edit the document details