LinkedList

Linked list is a data structure used for storing collection of data.Linked list have following properties:

  • Successive element are connected with pointers.
  • Last element point to null.
  • Can grow and shrink in size during program execution
  • Can be made just as long as required.
  • It does not waste memory space

Image result for linkedlist

Linked list ADT

1.Main Linked list operation

  • Insert:insert an element into the list
  • Delete:remove and return the specified position

2. Auxiliary Linked list operation

  •  Delete List:remove all element from the list
  • Count:return the number of element of the list
  • Find n position node from the end of list

Representation of Linked list in java

class LinkedList{

Node head;

class Node{

int data;

Node next;

Node(int d){

data=d;

}

}

}

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s