Fit the Most Tasks
Medium · rating 1400 · Greedy, Sorting
You have T minutes and a list of task durations. The first line has n and T. The second line has n durations. Print the maximum number of tasks you can finish within the time budget.
Constraints: 1 ≤ n ≤ 105
Related problems
- Double-Booked? — Medium
- Matchmaking Gap — Medium
- Shopping on a Budget — Medium
- Minimum Meeting Rooms — Hard
- Job Sequencing — Hard
- Count Anagram Groups — Medium