{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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

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

View Full Document
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.
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;

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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
Ask a homework question - tutors are online