Opening your workspace…
Workspace/Coding room
Opening your workspace…
Mark Rober wants to know how many porch pirates one glitter bomb caught. You've watched the video three times. The first person opens the box, gets glitter all over his glasses, hands it to his brother and then takes it back. Counting faces every time someone comes into view is going to make this prank look considerably more successful than it was.
The footage has already been tagged. Each letter identifies one person, and a dot means the box is off camera. A run starts with a positive decimal count followed by its tag: 12A means twelve consecutive frames of A. The files on your desk are consecutive clips from the same camera, so someone who appears at the end of one clip might still be holding the box at the start of the next.
Count a person once if they appear for at least the requested number of consecutive frames. A dot or a different person breaks the streak. How many people make the cut?
["2A","3A2B"], 5Output1A is in view for five consecutive frames across the cut.
["4A1.4A3B4B"], 6Output1A has two separate four-frame appearances. B has seven consecutive frames.
Keep the current tag and streak when advancing from one clip to the next.
function solve(clips, minimum) { // 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.