Status: IN
When `len(arr) < 3`, `range(n - 2)` produces an empty range, so `countGoodTriplets` returns 0 without error — no special-casing needed.
Source: entries/2026/06/06/count-good-triplets-solution.md
JSON