← November 2025 questions

NOVEMBER 2025 / INTERMEDIATE / QUESTION 5

Longest Streak Tracker

Archived question

Try the question in your own editor, then check your output below.

THE QUESTION

Text from the official booklet. Refer to the PDF for original mathematical notation, formatting, and linked input files. Printed samples and inputs are reproduced as published.

You, Jeff Nippard, are a personal trainer analysing your client’s workout logs. Find
the longest streak of consecutive days where reps strictly increase. Missing days
break the streak.
Sample Input:
[("2025-11-01", 50), ("2025-11-02", 55), ("2025-11-03", 60), ("2025-11-05",
70), ("2025-11-06", 72), ("2025-11-07", 75)]
Sample Output:
3
Question Input:
Question Input:
[("2025-11-13", 8), ("2025-11-02", 4), ("2025-11-25", 13),
("2025-11-12", 8), ("2025-11-03", 5), ("2025-11-21", 13),
("2025-11-01", 4), ("2025-11-08", 7), ("2025-11-06", 5),
("2025-11-17", 10), ("2025-11-30", 14), ("2025-11-15", 9),
("2025-11-18", 11), ("2025-11-24", 13), ("2025-11-22", 13),
("2025-11-07", 6), ("2025-11-04", 5), ("2025-11-29", 14),
("2025-11-09", 7), ("2025-11-20", 13), ("2025-11-28", 14),
("2025-11-26", 14), ("2025-11-19", 12), ("2025-11-10", 8),
("2025-11-14", 8)]

CHECK YOUR ANSWER

Try your answer.

Run your program in your own editor, then paste its output below. This checks the stated output; it does not assess your full program. Practice attempts do not affect competition scores.

Use the question input above. Enter only the output.

Reveal worked answer

Your output

4

Sort by date, then extend a streak only when the date is the next day and repetitions strictly increase.

Source: Girls in Code SEA 2025 Fall Competition, 29 November 2025. Booklet created by Emily Xu and the GIC question authors. Shared for non-commercial educational use with attribution, as permitted in the booklet.