Some Important Linear Data Structures- at a glance
Circular Linked List
Circular linked list is a more complicated linked data structure. In this the elements can be placed
anywhere in the heap memory unlike array which uses contiguous locations. Nodes in a linked
list are linked together using a next field, which stores the address of the next node in the next
field of the previous node i.e. each node of the list refers to its successor and the last node points
back to the first node unlike singly linked list. It has a dynamic size, which can be determined
only at run time.
1. The advantage is that we no longer need both a head and tail variable to keep track of
the list. Even if only a single variable is used, both the first and the last list elements can
be found in constant time. Also, for implementing queues we will only need one pointer
namely tail, to locate both head and tail.
2. The disadvantage is that the algorithms have become more complicated.
Insert – Inserts a new element at the end of the list.
Delete – Deletes any node from the list.
Find – Finds any node in the list.
Print – Prints the list.
Lists : Linear data structures, contain elements, each of which point to the "next" in the sequence as demonstrated in the examples below ( Simple, Circular and Double Linked Lists are some common kinds of lists ) . Additions and removals can be made at any point in the list - in this way it differs from stacks and queues.
Some Important Data Structures and Algorithms, at a glance:
The gadget spec URL could not be found
Computer Science >