CSE143
Lecture Worksheet 8/13/2004


An array contains Movie objects, each of which gives the title, director, length, country of origin, and other information about a single movie.  The Movies are in no particular order.

Sketch out one or more (different) ways to attack each of these problems.  First think whether the problem can be solved by first sorting the entire array in some way, and doing something with that sorted array.  Then see if there is an alternative approach.

1.  You want a list of all the movies, grouped by country (with the countries in alphabetic order), and the move titles in alphabetical order within county.






2. You want to know what the median length is among all the movies.







3. You wish to know whether a particular's movies length is in the top 10% of all movies (by length).







4. You want a list of all movie titles which have been used more than once (exact same title).