How to implement a linked list?

can anyone please tell me how to implement a linked list

Replies

  • skipper
    skipper
    Yup; set up a data type with 3 elements, two are addresses and the third is data (arbitrarily sized). You can now construct a binary, or other kind of list. The addresses need to be of successor and predecessor entries in the list.

    The first element or head of the linked list has no predecessor, it links "back" to itself; its forward link is the address of the 2nd element. You need to code the appropriate list handlers, to insert/delete elements, change their position in the list, and traverse lists.

    Among other things.
  • shalini_goel14
    shalini_goel14
    Hi judy3,

    You can also use Java1.4+ based readymade LinkedList class and consists of all the functions required for a linked list.

    Check this to know more about the class
    #-Link-Snipped-##-Link-Snipped-#

You are reading an archived discussion.

Related Posts

What is mean by struct in java? Please give me a explanation of struct.😕
Cosmic radiation is known to cause Ionization of gasses in the upper atmosphere. The problem lies in the fact that, apart from the cosmic radiation from sun, the galactic cosmic...
Hi Folks! I wrote a classic snake game this weekend, The code is in C#, and is open source and available free for use and reuse. This can serve as...
Hi, Am presently in final year production. I need an idea for the final year project. My focus is for the society so tel me any idea which you feel...
Hi everyone, This is the First of several posts on Fuzzy logic. Il slowly post the entire tutorial: Please leave your suggestions, feedback and question which we will discuss in...