This preview shows pages 1–2. Sign up to view the full content.
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
This note was uploaded on 05/25/2010 for the course CPE CPE 360 taught by Professor Jenniferchen during the Spring '10 term at Stevens.
 Spring '10
 JenniferChen

Click to edit the document details