In computer science, a linked list is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is comprised of a datum and a reference(in other words, a link) to the next node in the sequence; more complex variants add additional links. This structure allows for efficient insertion or removal of elements from any position in the sequence.
A linked list whose nodes contain two fields: an integer value
and a link to the next node.
Linked list can be accessed in a flexible fashion, because each piece of information carries with it a link to the next data item in the chain. In addition, a linked list retrieval operation does not remove and destroy an item from the list. In fact, you need to add a specific deletion operation to do this.
Linked lists can be :
Linear and Circular linked list: In the last node of a list, the link field often contains a null reference, a special value used to indicate the lack of further nodes. A less common convention is to make it point to the first node of the list; in that case the list is said to be circular or circularly linked; otherwise it is said to be open or linear.
Singly linked list: Singly-linked lists contain nodes which have a data field as well as a next field, which points to the next node in the linked list.
Linear and Circular linked list: In the last node of a list, the link field often contains a null reference, a special value used to indicate the lack of further nodes. A less common convention is to make it point to the first node of the list; in that case the list is said to be circular or circularly linked; otherwise it is said to be open or linear.
Download Link:
http://www.fileserve.com/file/dgxgZ4P/Dynamic_representation_of_singly_Linked_list.txt
Doubly linked list: In a doubly linked list, each node contains, besides the next-node link, a second link field pointing to the previous node in the sequence. The two links may be called forward(s) and backwards, or next and previous.
No comments:
Post a Comment