Linked list: Difference between revisions

Added note so that no one needs to insult the tasks anymore
m (Complexity of list operations mentioned)
(Added note so that no one needs to insult the tasks anymore)
Line 1:
[[Category:Encyclopedia]][[Category:Data Structures]]A '''linked list''' is a data structure which allows a great deal of flexibility in memory allocation and data sorting. Linked lists depend on [[reference|references]] for their organization. Information is stored in "nodes" which contain data (integers, strings, etc., sometimes called an "element") and one or more "links" to to other nodes. The number of links determines what type of linked list it is (one link: "singly-linked list", two links: "doubly-linked list", three links: "triply-linked list", etc.), though one or two links are most common. Linked lists have a "head" (the first node in the list) and sometimes a "tail" (the last node).
 
In most languages, an implementation of a linked list is given and programmers will likely never need to create their own implementation. Most programmer-defined implementations found here should not be used in programs, but rather they are here to demonstrate language features and to help show how a linked list works.
 
Here are examples of the two common types of linked lists:
Anonymous user