HW03_sln

HW03_sln - CSE310 HW03 Thursday Due Thursday A Please note...

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

CSE310 HW03, Thursday, 02/18/2010, Due: Thursday, 02/25/2010 Please note that you have to typeset your assignment using either L A T E X or Microsoft Word. Hand-written assignment will not be graded. You need to submit a hardcopy before the lecture on the due date. You also need to submit an electronic version at the digital drop box. For the electronic version, you should name your ﬁle using the format HW03-LastName-FirstName. 1. (10 pts) Assume that you are using quicksort to sort 6 elements a 1 ,a 2 ,...,a 6 . Also assume that the elements are distinct. Draw the part of the decision tree that contains the path from the root node to the leaf node corresponding to the ordering a 1 < a 3 < a 5 < a 2 < a 4 < a 6 . Solution: The decision tree is as follows. 1

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

View Full Document
Grading Keys: Starting from root node, 1pt for each correct node, until the 1st mistake; 5pts will be cut oﬀ if there are 4 blocks. 2. (10 pts) Prove that the average time complexity of insertion sort for sorting
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

HW03_sln - CSE310 HW03 Thursday Due Thursday A Please note...

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

View Full Document
Ask a homework question - tutors are online