A sentinel node is a specifically designated node used with linked lists and trees as a traversal path terminator. A sentinel node does not hold or reference any data managed by the data structure. Sentinels are used as an alternative over using null as the path terminator in order to get one or more of the following benefits:
- Increased speed of operations
- Reduced algorithmic complexity and code size
- Increased data structure robustness (arguably)
Read more about Sentinel Node: Example
Famous quotes containing the word sentinel:
“It is a noble land that God has given us: a land that can feed and clothe the world; a land whose coastlines would enclose half the countries of Europe; a land set like a sentinel between the two imperial oceans of the globe.”
—Albert J. Beveridge (18621927)