Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.23 KB

linkedlist.md

File metadata and controls

33 lines (28 loc) · 1.23 KB

Linked List

  • A linked list is nothing but a collection of values, each of which has the capability to point to some other value.
  • The key is the specialized values with pointers, a.k.a. nodes.
    • A single node (head) is enough to represent a singly linked list.
    • Two nodes (head and tail) are enough to represent a doubly linked list.
    • A linked list is the simplest data structure that nodes can represent. Combined with, for example, a hash table, the hybrid data structure can build a LRU cache.
  • Linked list vs. Tree
    • Topologically, a linked list is equivalent to a unary tree.
    • A doubly linked list is a unary tree whose nodes can reference their parents.

Quizzes

Tags

  • linked-list