
July 20, 1969. Twelve minutes from the lunar surface, Armstrong's computer starts flashing 1202. A rendezvous radar left in the wrong position is stealing cycles, and the core set that holds running jobs keeps filling up. The executive was built for exactly this: when there is no room, the new job is thrown away and the landing keeps its slots. Steve Bales calls go, and they land with seconds of fuel. Count what the executive had to throw away.
Objective
Count the jobs the executive had to throw away for lack of room.
Steps
$ rejected({2,2,2}, 3, 5)
1
$ rejected({1,1,1}, 3, 3)
0
$ rejected({1,1}, 2, 0)
2
Expected files
Allowed functions
None. Write every helper yourself.
Loading solutions...