.

Saturday, October 26, 2019

COP 3530, Discrete Data Structures and Algorithms, Summer 1999, Homework 3 :: UFL Florida Computer Programming Homework

Class Notes: Data Structures and Algorithms Summer-C Semester 1999 - M WRF 2nd Period CSE/E119, Section 7344 Homework #3 -- Due Thu 10 June 1999 : 09.30am This is the key for Homework #3. Answers are in blue typeface. * Question 1. Given an 8-element sequence S = (3, -10, 4, -3, 8, 6, 5, 1), diagram the merge-sort tree (architecture) for the divide, sort, and conquer phases of the merge-sort algorithm, as we did in class. Label each level (e.g., L1, L2, etc.), as you will need this information in Question 2. Do not write code for merge-sort. Answer: Level 1 (3, -10, 4, -3, 8, 6, 5, 1) / Level 2 (3, -10, 4, -3) ( 8, 6, 5, 1) / / Level 3 (3, -10) (4, -3) (8, 6) (5, 1) X X X X

No comments:

Post a Comment