Sunday 11 September 2011

Some terminology of Doubly Linked List programs

Some terminology of Doubly Linked List programs
Term
meaning
Node <T> * l;
Declaring a pointer ‘l’ to the 1st node. Pointer ‘l’  may contain int ,float, or char address
Node<T> * r;
Declaring a pointer ‘r’ to the last node.
l=NULL;
r=NULL;
Empty doubly linked list
Node<T> *p=l;
p->data;
Accessing the data of the node object
Node<T> *p;
p->llink;
Accessing the llink (pointer) of the node object. Left Link Pointer. Which contains the previous node
Node<T> *p;
p->rlink;
Accessing the rlink (pointer) of the node object. Right Link Pointer. Which contains the next node
P=p->rlink
Moving the pointer p to next node
P=p->llink
Moving the pointer p to prevous node


Types of Linked list

No comments:

Post a Comment