Skip to content

node [terminology]

Terminology

Usage

  • Use for a tree, linked-list, trie, or graph node currently being processed.
  • Prefer it over cur when currentness is less important than the object's node identity.
  • Use cur when walking a linked list and repeatedly advancing the same pointer.
node = stack.pop()
res.append(node.val)