← Back to Difficulty Selection
Code Review (Easy): Flexible Credit Allocation
Story
Lena was working on a small update for the company’s internal recognition platform to help managers distribute reward points more effectively. Eva requested a feature that lists every possible combination of available point bundles that adds up exactly to a manager's remaining budget, allowing for bundles to be used more than once. For example, if the system offers bundles of 2, 3, and 5 points and a manager has 8 points to spend, the tool should suggest using four 2-point bundles, or a 2-point bundle with two 3-point bundles, or a 3-point bundle with a 5-point bundle. This ensures that no points go to waste regardless of which specific denominations are currently available in the system.
Your Task
Read the story and code, then decide if the code is ready for production or needs improvement.
Hints
What would block an approval? Give me a hint.
Next
Check out Next Topic: Rotating the Review Pool