Opening your workspace…
Workspace/Coding room
Opening your workspace…
Light has until the end of class to write names in the Death Note. He copies them in the order listed, one letter per second. Spaces take no time. How many names can he finish before the bell? A name finished just as the bell rings counts.
["Joe","Mary Ann","Ed"], 10Output2Joe takes three seconds and Mary Ann takes seven. The bell rings on the last n.
["Abel","Jo"], 3Output0Light has to finish Abel before starting Jo.
Count letters and stop when the next full name would miss the bell.
function solve(names, seconds) { // Write your solution 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.