๐ WAYPOINT LESSON
The clause that decides
โญโญโญ advancedโณ 10 min read๐ Lesson 209 of 256
Tie-breaks, strictness, sentinels, format rules โ circle every operator-deciding word; the circles are the rubric.
The hardest single-method FRQs fail students on one clause, not on the algorithm. The clause types, in order of appearance on real exams:
- Tie-break clauses: "on a tie, return the one appearing
FIRST/SMALLEST." Your loop's comparison must implement the
tie-break exactly โ
>keeps the first-seen;>=keeps the last. - Strictness clauses: "more than," "at least," "strictly between." Each maps to an operator; underline them.
- Sentinel clauses: "return -1/0.0/999 if none." A sentinel forces a two-variable scan (the candidate and a found-flag) or an early return โ one accumulator cannot serve both jobs.
- Format clauses: "adjacent duplicates are replaced by a star" โ output-shaping specs where the boundary iteration (start at index 1, compare backward) is the entire difficulty.
Read the spec once for the story, then a second time circling every operator-deciding word. Those circles are the rubric.