CrazyEngineers
  • How to implement a linked list?

    judy3

    Member

    Updated: Oct 20, 2024
    Views: 1.1K
    can anyone please tell me how to implement a linked list
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • skipper

    MemberJul 19, 2009

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • shalini_goel14

    MemberJul 20, 2009

    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-#
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register