Give me a coding practice problem with hints

Sets one coding practice problem at your level with three hints that grow more concrete and a test list, without showing the solution.

Task: Set me one coding practice problem that I can solve in about 30 minutes, with hints that I can open one at a time. Context: I am learning [programming language] and I am at the level of [what you already know]. The concept I want to practice is [concept]. I do the problem alone, as practice and not as graded work. Rules: - Describe the problem in at most 100 words with a realistic situation, the input, the expected output and one example. - Give 5 test cases as input and expected output pairs, including one edge case. - Write three hints from a light nudge to a concrete step, each marked "Hint 1", "Hint 2" and "Hint 3", and place them after the tests. Do not give the solution or its code. - Tell me to follow my course's rules on collaboration and AI help for graded work. Result: The problem, the tests as a table, then the three hints. Offer a review of my own solution in one closing sentence.

Updated