A sentinel node is a node contained in a data structure that does not hold any value. Instead, it it used to guide traversal or modification of the structure in memory.

In a doubly linked list, a sentinel node is often used as either the first or last node in the list to mark either the beginning or end. This simplifies operations such as "push" and "pop" by allowing them to assume the list always contains at least one node.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence