I am wondering if sentinel nodes are more efficient than null. In terms of Big O, the the Big O is the same. However, there are two aspects: time usage and space usage. Is this a tradeoff (or not since in Python the object is pointer anyway)? I am specifically interested in trees and graphs. For example, a binary tree could be implemented with sentinel nodes and without sentinel nodes.
1.4m articles
1.4m replys
5 comments
57.0k users