← back to unit
Medium
# sorting medium
The Chore Hour
You have exactly 60 minutes of chore energy. To finish the MOST chores, do the quick ones first! ⏳
You get each chore's minutes. Print how many chores you can finish in 60 minutes.
Example:
Input: minutes = [30, 10, 25, 15]
Output: 3
Sorted ascending, the list becomes [10, 15, 25, 30]. Doing the shortest chores first fits 10 + 15 + 25 = 50 minutes (3 chores) before the next one (30) would burst past 60.
💡 need a hint?
sort-chore-hour.py🔒 given lines are locked — write your code in between
loading...