HW03_sln

HW03_sln - CSE310 HW03, Thursday, 02/18/2010, Due:...

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

View Full Document Right Arrow Icon
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 file 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
Background image of page 1

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

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

Page1 / 7

HW03_sln - CSE310 HW03, Thursday, 02/18/2010, Due:...

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

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