k-beauty-window-count-formula

Status: IN

The sliding window iterates exactly `len(str(num)) - k + 1` times, which is the complete set of contiguous length-k substrings; if `k` exceeds the digit count, the range is empty and the function safely returns 0.

Source: entries/2026/06/06/find-the-k-beauty-of-a-number-solution.md

JSON