在Sentinel Node维基百科页面上,它表明Sentinel节点优于NULL的好处是:
我真的不明白对Sentinel节点的检查会更快(或者如何在链表或树中正确实现它们),所以我想这更像是一个两部分问题:
c++ algorithm data-structures
algorithm ×1
c++ ×1
data-structures ×1