You are on page 1of 1

Introduction to Data Structures and Algorithms (SCS1006) Tutorial 3 2012.05.23. 2011CS135 1.a)assign the first node to the newnode.

next b) assign newnode to header.next 2.to access first item you should use header.next and after that you have to use .next after each and every item exist in the list until reach the corresponding item 3.if the list is p,q and we need to add r between p and q Then q.previous =r r.next =q p.next =r r.previous=p

4. this creates a node class which has two methods .Node() method hsnt any parameter (with default constructer),it gives null for nodeValue and null for next item of the list.second method Node(T item) assigns item into nodeValue and null for next item.

You might also like