Apple often asks for O(n) detection of contiguous runs (build numbers, SDK versions). The HashSet “start of sequence only” trick is the standard linear proof.
Enable JavaScript for the full StreamPrep guide.