Types of Linked List

Linked lists are grouped into several standard shapes. Three abbreviations you will see everywhere are SLL (singly linked list), CLL (circular linked list), and DLL (doubly linked list). Below: what each means in C-style terms, then a side-by-side comparison. Dedicated lessons later cover singly, doubly, and circular lists in more depth.

1) What is SLL? (Singly Linked List)

SLL means each node has one link field, usually called next, pointing to the following node. The last node’s next is NULL. You can only traverse forward from the head in one pass—there is no built-in “previous” pointer.

  • Memory per node: data + one pointer (smallest overhead among the three families).
  • Typical use: stacks, simple queues, chains where you only move forward or you always keep a pointer to the node you care about.
  • Trade-off: deleting a node or inserting before a node often needs the previous node’s address, which may require an extra scan from the head.

2) What is CLL? (Circular Linked List)

CLL describes the shape of the list: the chain does not end at NULL the way a linear list does. Instead, the “tail” links back into the structure—usually to the head—so nodes form a ring. That idea is independent of how many links each node stores, so a circular list can be either singly or doubly linked.

  • Circular singly linked list: like SLL, each node has one pointer (next). The last node’s next points to the head (or another agreed node), not NULL. You still traverse forward only, but you move in a cycle.
  • Circular doubly linked list: like DLL, each node has prev and next. The first node’s prev points to the last node, and the last node’s next points to the first, closing the ring. You can walk the circle in both directions.
  • Idea: “no end”—rotation, round-robin scheduling, or cyclic buffers are natural fits.
  • Caution: traversal must stop on a rule you define (e.g. stop when you return to the start); infinite loops are easy if you forget a termination condition.

3) What is DLL? (Doubly Linked List)

DLL means each node stores two pointers: typically prev and next. You can walk the list forward and backward without rescanning from the head.

  • Memory per node: data + two pointers (more space than SLL).
  • Typical use: browser-style back/forward, LRU caches, editors with bidirectional navigation, any structure needing O(1) removal when you already hold a pointer to the node.
  • Trade-off: more pointer updates on insert/delete; slightly more room for bugs if prev/next are not kept consistent.

4) SLL vs CLL vs DLL — comparison (table)

The table compares the usual singly linear list (SLL), a circular singly list as the typical CLL mental model, and a linear doubly list (DLL). Variants can be mixed (e.g. circular doubly).

Aspect SLL
(Singly, linear)
CLL
(Circular, often singly)
DLL
(Doubly, linear)
Pointers per node 1 (next) 1 (next); last → head (or ring) 2 (prev, next)
End of list Last next == NULL No NULL end; cycle back Ends NULL (both ends in linear DLL)
Traversal direction Forward only Forward in a loop Forward and backward
Memory overhead Lowest Same as singly variant used Higher (extra pointer)
Insert/delete at known node Often needs previous; may scan from head Similar to SLL + careful cycle logic Easier O(1) if node pointer known
Typical pitfalls Losing next before reassignment Infinite traversal; empty vs one-node ring prev/next symmetry bugs

Your next topics: Doubly Linked List and Circular Linked List in C.