Module 15 · In your browser · challenge 3 of 3 in this lesson
planSprint walks tasks in priority order and keeps a task only if its dependency (if any) is already kept AND every role cost fits in remaining budgets
A code cell with the real Luau runner grades it. No Studio needed.
Open
Level 3, Professional
Challenge
Write planSprint(tasks, budgets) in the cell below so role budgets and dependencies are enforced automatically.
- Start from
- The Luau cell below (runs in your browser)
- Check it here
- Run the code cell; the challenge completes when it passes. No Studio needed.
Done means
- planSprint walks tasks in priority order and keeps a task only if its dependency (if any) is already kept AND every role cost fits in remaining budgets
- Subtracts kept task costs from the remaining role budgets before checking later tasks
- Skips tasks that do not fit or whose dependency was skipped, and keeps checking later tasks
- Returns keptIds (array in kept order) and remaining (table of leftover days per role)