sentinel-initialization-encodes-boundary-conditions

Status: IN

Sentinel initial values (-1, 0, None, specific constants) are used to encode boundary conditions directly into loop initializers, eliminating first-iteration special-case branches and keeping loop bodies uniform.

Justifications

all four use domain-specific sentinels (-1 for "no previous index", 0 for "no previous group", -1 for "any subtree unbalanced") that make the first loop iteration produce the correct vacuous result without an explicit guard

Depends on (SL): ascending-check-uses-sentinel-minus-one, k-length-apart-sentinel-minus-one, prev-zero-sentinel, getheight-sentinel-neg1

Depended on by

JSON