Skip to content

dummy [terminology]

Terminology

Usage

  • Use for a sentinel node that simplifies insertion, deletion, or head replacement.
  • It is not part of the logical result unless explicitly returned.
  • Prefer dummy over sentinel in short linked-list algorithms used throughout this file.
dummy = ListNode(0, head)
slow = fast = dummy