Tutorial_7_v02-for-viewing-printing - CC2203 Data...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sem 2, 2009-2010 Tutorial 7 Instruction In this tutorial, you are required to submit your tutorial work answers for the exercises to me. Tutorial work will not be graded unless your coursework fails (coursework below D grade). If one’s coursework fails, that tutorial work will be graded to see if condone pass should be issued or not. Exercise 1 In Figure 1, the pointer front points at the first node, the pointer next points at the next node and the pointer c points at the third node. Figure 1 Complete the following five Java statements: c = = front.next.next.next; c.next.next.next = = front.next.next; c.next.next.next.next = such that after executing these statements, the linked list in Figure 1 is split into two linked lists. One list starts at node 1 pointed by c pointer and contains the elements in the order 1 , 2 , 3 and 5 . The other list starts at node 4 pointed by front pointer and contains the elements in the order 4 and 6 . These two lists are shown in Figure 2. (Note: adding
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/18/2011 for the course COMP 3868 taught by Professor Keithchan during the Summer '97 term at Hong Kong Polytechnic University.

Page1 / 2

Tutorial_7_v02-for-viewing-printing - CC2203 Data...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online