Each full cycle of the triangular schedule spans two half-cycles. The cycle index tells the schedule which triangle it is on, and it sets where the peak falls.
Implement cycle_index(it, step), the 1-indexed cycle containing the iteration.
Divide the iteration by twice the half-cycle length, add one, and take the floor.
No results yet
Run your code to check it against the examples, or submit to run every test.