Algorithms and Data Structures 2006: Lab Exercises and Tests

Note: access to solutions linked from here will be withdrawn during periods when similar exercises may be set as lab work or coursework in courses currently taught at Queen Mary.

Weekly lab exercises

  • 16 January
  • Exercise 1 with solutions here
  • 23 January
  • Exercise 2 with solutions here
  • 30 January
  • Exercise 3 with solutions here and here
  • 6 February
  • Exercise 4 with solutions here (both iterative and recursive solutions given)
  • 13 February
  • Mid-term test with model answers here
  • 20 February
  • Exercise 5 with solutions here
  • 27 February
  • Exercise 6 with solutions here
  • 6 March
  • Exercise 7 with solutions here
  • 13 March
  • Exercise 8 with solutions here.
  • 20 March
  • Exercise 9 with solutions here.
  • 27 March
  • Exercise 10 with solutions here, also End-of-term test with model answers here

    Note that where solutions are given, they will include supporting code which will allow you to test the method. Please note that under examination conditions, if you are asked to write a method to do something you should write just that method (and possibly auxiliary methods which you define yourself to make it work), and not the supporting code. No exam question will ask or expect you to write the main method which starts off execution of a Java program, or code to prompt a human user to type anything or code to display any results to a human user.


    Matthew Huntbach
    Last modified: 15 August 2007