Prototype: implement prototype(List<Job> jobs) returning List<String> with a direct baseline.

Final: implement solve(List<Job> jobs) with the mechanism and bounds described above. Require unique job IDs and end > start, otherwise IllegalArgumentException. Return IDs selected after sorting by (end,start,id) and accepting each start >= the preceding selected end. Empty input returns empty. Example (b,0,2),(a,0,2),(c,2,3) selects a,c. Both stages have the same observable contract. The prototype may use the simpler method; final must use the target data structure.

The supplied nested record types define the API. All methods are static members of Exercise.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.

Java runs on this device with CheerpJ 4.3.