CS351HW2-Fall2009.Sol2

# CS351HW2-Fall2009.Sol2 - Safa Eriti Sec03 CS 351 Homework 2...

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

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

View Full Document
Safa Eri ş ti Sec03 2 | Page Before reorganizing, we had 175,000, so It takes (175,000/6) * 0.84/2 = 12250ms to fetch After reorganizing we have 150,000 records. So it takes (150,000/6) * 0.84/2 = 105000ms to fetch Answer 3. We are asked to print total population of a town within a county, total population of a county within a city and total population of a city. First, we open 2-dimensional array in the memory and We start processing the file, for every unique we add instance to the array. Whenever we come across a record with same city, county and town, we add its population to the existing population. For example let the first record be Artvin, Ş av ş at, YavuzKöy, Ahmetler with 200 population, we have And let the 10 th record be Then in the memory we would have After finishing processing the file we will only deal with
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/01/2011 for the course CS 351 taught by Professor Fazlıcan during the Spring '11 term at Bilkent University.

### Page1 / 10

CS351HW2-Fall2009.Sol2 - Safa Eriti Sec03 CS 351 Homework 2...

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

View Full Document
Ask a homework question - tutors are online