3 - CSCE 350: Data Structures and Algorithms Homework 3...

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

View Full Document Right Arrow Icon
CSCE 350: Data Structures and Algorithms Spring 2010 Homework 3 Solution 03/01/10 1. (1 point) Apply the following algorithms to sort the list H , O , M , E , W , O , R , K in alphabetical order: (a) Merge Sort; (b) Quick Sort For each algorithm, make sure you write out the intermediate steps in order to get the points. (a) H O M E W O R K H O M E W O R K H O M E W O R K H O M E W O R K H O E M O W K R E H M O K O R W E H K M O O R W (b) i j H O M E W O R K i j H O M E W O R K i j H E M O W O R K j i H E M O W O R K E H M O W O R K i j M O W O R K i j M K W O R O j i M K W O R O K M W O R O i j W O R O ij W O R O O O R W
Background image of page 1

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

View Full DocumentRight Arrow Icon
i j O O R ij O O R O O R 2. (0.5 points) Problem 3.2.4. 3. (0.5 points) Problem 4.1.5. 4. (0.5 points) Problem 4.2.6.
Background image of page 2
5. (0.5 points) Problem 4.3.1. 6. (0.5 points) (a) Design an algorithm for solving the following task and write out its pseudocode: Input : An array A[0. .n-1] of integers and a search key K Output : The distance of the most distant pair of two elements that are equal to K;
Background image of page 3

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

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

This note was uploaded on 06/11/2011 for the course CSCE 350 taught by Professor Staff during the Spring '08 term at Columbia SC.

Page1 / 5

3 - CSCE 350: Data Structures and Algorithms Homework 3...

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