Skip to main content

What is a linked list and why linked list?


What is a linked list?
     A linked list is a linear data structure used to organize the data in the memory. As its name indicates linked list is a list of items called the 'NODE' linked using  pointers. A 'NODE' is a structure of List containing  two or more fields called the 'data /Info' field and 'Link/address' field. A linked list can be of any of the following type. Linked list used for collecting a sequence of objects, which allows efficient addition, removal and retrieval of elements from any position in the sequence. It is implemented as nodes, each of which contains a reference (i.e., a link) to the next and/or previous node in the sequence.
bulletSingly-Linked ListsbulletDoubly-Linked Lists or Two way Linked ListbulletCircularly-Linked ListsbulletCircularly-Doubly Linked Lists






Fig: Simple Linked List.



Why Linked lists?
            Let us consider an example of implementation of a STACK or a QUEUE using a linear array then it is necessary to declare the SIZE of the STACK or QUEUE array (at Compile time) this may leads to either memory wastage or insufficient memory. This is the main disadvantage of a linear array. So if we use a linked list, we can allocate the  memory "Dynamically"   ( ie. during Run time). So there will not be any problem of memory wastage or insufficient memory.
           Whenever we want to insert or delete an element from a linear array either we must overwrite the value or we should shift the elements to new location. Where as in a linked list we can directly insert or delete the elements without effecting the other elements. So we need Linked List. 



Comments

  1. Thanks for your informative article. Java is most popular programming language used for creating rich enterprise, desktop and web applications. Keep on updating your blog with such informative post. Java Course in Chennai | Best JAVA Training in Chennai

    ReplyDelete

  2. As I am fresher I have an interest in new technology.so,now I am planning to learn new technology in a blog, here i had some interesting concepts, it was crystal clear to read keep sharing thanks
    Regards,
    sas course in Chennai|sas training institutes in Chennai|sas training in Chennai

    ReplyDelete
  3. Helo
    I really enjoyed while reading your article, the information you have mentioned in this post was damn good. Keep sharing your blog with updated and useful information.
    Regards,
    SAP MM Training In Chennai|sap training in Chennai|sap course in Chennai|SAP Training in Chennai

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. Thank you so much for this info. It is really useful. java training in chennai

    ReplyDelete
  6. Hello! This is my first visit to When I initially commented, I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several your blog!
    safety course in chennai

    ReplyDelete
  7. Sap Training Course in Delhi, Noida and Gurgaon with 100% Live Project. High Technologies Solutions is a One Of the Leading Institute in Delhi, India for Sap Course/Classes/Center/Institute with Global Certified Center. Call Now & Get Free Demo Classes-+91-9311002620.
    best institute for sap course in Delhi
    best institute for sap course in Noida
    best institute for sap course in Gurgaon

    ReplyDelete
  8. nice blog, I like your good post, thanks for sharing great information.
    Web Designing Training in Noida

    ReplyDelete
  9. Hey, would you mind if I share your blog with my twitter group? There’s a lot of folks that I think would enjoy your content. Please let me know. Thank you.
    Java Training in Chennai | J2EE Training in Chennai | Advanced Java Training in Chennai | Core Java Training in Chennai | Java Training institute in Chennai

    ReplyDelete

Post a Comment

Give your valuable Comment...