page_title: Linked data structure
section_title: Linked lists
hierarchical_section_title: Linked data structure / Common types of linked data structures / Linked lists
caption_attribution_description: English: this photo has been made using paint.it shows a single node.
context_page_description: In computer science, a linked data structure is a data structure which consists of a set of data records linked together and organized by references. The link between data can also be called a connector.
  In linked data structures, the links are usually treated as special data types that can only be dereferenced or compared for equality. Linked data structures are thus contrasted with arrays and other data structures that require performing arithmetic operations on pointers. This distinction holds even when the nodes are actually implemented as elements of a single array, and the references are actually array indices: as long as no arithmetic is done on those indices, the data structure is essentially a linked one.
  Linking can be done in two ways – using dynamic allocation and using array index linking.
  Linked data structures include linked lists, search trees, expression trees, and many other widely used data structures. They are also key building blocks for many efficient algorithms, such as topological sort and set union-find.
context_section_description: A linked list is a collection of structures ordered not by their physical placement in memory but by logical links that are stored as part of the data in the structure itself. It is not necessary that it should be stored in  the adjacent memory locations. Every structure has a data field and an address field. The Address field contains the address of its successor.
  Linked list can be singly, doubly or multiply linked and can either be linear or circular.
  Basic properties
  Objects, called nodes, are linked in a linear sequence.
  A reference to the first node of the list is always kept.  This is called the 'head' or 'front'.
  A linked list with three nodes contain two fields each: an integer value and a link to the next node
caption: A linked list with a single node.
exif: {}