spring04_pset9

spring04_pset9 - Massachusetts Institute of Technology...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Massachusetts Institute of Technology Department of Aeronautics and Astronautics Cambridge, MA 02139 16.03/16.04 Unified Engineering III, IV Spring 2004 Problem Set 9 Name: Due Date: 4/13/04 Time Spent (min) CP7_9 P1 P2 S8 S9 Study Time Announcements: CP7_9 The problems in this problem set cover lectures C7, C8, C9 and C10 1. What is the Minimum Spanning Tree of the graph shown below using both Prims and Kruskals algorithm. Show all the steps in the computation of the MST (not just the final MST). 2. Compute the computation complexity of the bubble sort algorithm. Show all the steps in the computation based on the algorithm. 3. What are the best case and worst case computation complexity of: a. Inserting a node into an unsorted singly linked list b. Inserting a node into a sorted singly linked list Show the steps in the complexity computation based on the algorithm and justify your answer by using a diagram of the insertion operation. 4. a. Design an Ada95 Package to: i. Read in N integers from an input file into an array. (N is user defined <=50) ii. Sort the array in ascending order iii. Perform binary search on the array. b. Write a program to test your package that will- Prompt the user for a number to search for.- If the number is found using the binary search algorithm- Display the location (index)- Display the number- If the number is not found using the binary search algorithm- Display Number not in array to the user Turn in an electronic copy of your Package and test program and a hard copy of your algorithm and code listing....
View Full Document

This note was uploaded on 01/28/2012 for the course AERO 16.01 taught by Professor Markdrela during the Fall '05 term at MIT.

Page1 / 8

spring04_pset9 - Massachusetts Institute of Technology...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online