NUIMCrest CS211 - Algorithms and Data Structures II
Department of Computer Science, NUIM
Laboratory Sheet 11

For week beginning Monday 24 April 2000
T Naughton, NUIM
Back to CS211 home


Lab Exam 11

  • Provide solutions to problems 11.1 and 11.2.
  • No books, notes, computers allowed.
  • Use the paper provided by demonstrators.
  • You have 60 minutes.
  • Write your name below.

    Name:......................................................................... Student No:...................................

    Important: Write clearly. If necessary write out a neat and formatted version of your code separate from your rough-work.

    Problem 11.1 Write a method for an ordered binary tree that returns the height of the smallest element in the tree.

    Problem 11.2 A class to implement a hash table of airports and their locations is required. Each airport has the following properties: a name, a three digit serial code, and a grid reference. The airport grid reference (the key) is stored as a floating point number, the airport name is stored as a character string, and the three digit code is stored as an integer. Write a suitable hash() function, countfree() method, and insert() method. You do not have to write the class definition.


    End of Lab Sheet