Opening your workspace…
Workspace/Coding room
Opening your workspace…
The matchbox theatre can fit one act at a time. Each flea offers [start, finish, crumbs] for a spell on stage. An act may start the instant another finishes. Choose any compatible acts and return the largest crumb fee the theatre can collect. Practice rank · 5 kyu (Brewery estimate).
[[0,4,7],[0,2,4],[2,4,5]]OUTPUT9Two short acts earn four and five crumbs. The long solo earns seven.
[]OUTPUT0The theatre sweeps up early.
In finish-time order, compare skipping an act with taking it after the best compatible programme.
function solve(acts) { // Write your answer here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.
[[0,4,7],[0,2,4],[2,4,5]]9