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.
dummy = ListNode()
tail = dummy
# ...
return dummy.next

See 21. Merge Two Sorted Lists.