Monash University > CSSE > CSE1303 > Part A > Tutorials > Tutorial A4

CSE1303 Computer Science
Semester 2, 2003
Part A
Tutorial A4 : Linked Structures

This tute covers material from lectures A07 to A09.

There may not be time in the tutorial to cover all of these questions. Attempt at least the ones marked with an asterisk before the tutorial; these are the ones that will be focussed on during the class. If you have specific questions about unmarked questions, you can ask the tutor about them during the tutorial. If you want further revision questions, suggestions of questions from the textbooks are provided at the end of the tutorial sheet.


Note: The purpose of tutorials is not simply to give you the answers to these questions! (Solutions will be released in about a week online, so if all you want is the answers, there are easier ways.)


* Exercise 1

* Exercise 2

* Exercise 3

Exercise 4

  1. Change the function Node* setPosition(List* listPtr, int position) given in the lectures notes so that it returns NULL if position corresponds to an invalid position in the list.

  2. Now change the function void insertItem(List* listPtr, float item, int position) given in lectures notes so that it works correctly using the new version of setPosition for all possible inputs.

* Exercise 5

* Exercise 6

ADDITIONAL EXERCISES

[ Top | Home ]

Last modified 2002-07-03