Midterm 3 Solutions 12

But suddenly lots of female dogs realize they are

This preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: size (in KB) of the file he could sort for \$4900? Write your answer on the answer sheet (not here!). (Hint: You may want to start with some “ballpark” estimates on the number of passes, and then think about cost per pass.) [3pt] 4,900 KB. In one pass, we can sort 50 pages. This would cost 2N = \$100. We need to go deeper. In two passes, we can sort 50*49=2450 pages of data. This would cost 4N = \$9,800. So we’re on the right track with 2 passes, but we need to sort less data. Specifically, 4N=\$4900, so N = 1,225 pages. So how many KB? 4N = 4,900 KB. 15. Coach X was the football coach of Berkeley. He had a huge table SELECT name, weight called “Footballers” that had many attributes about his players, FROM Footballers...
View Full Document

This note was uploaded on 01/24/2014 for the course CS 186 taught by Professor Staff during the Fall '08 term at University of California, Berkeley.

Ask a homework question - tutors are online