Video Stitching
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
A sporting event lasts time seconds. You have video clips, where clips[i] = [start, end] covers the closed interval from start to end. Clips may overlap and can be trimmed freely.
Return the minimum number of clips whose trimmed pieces together cover the whole interval [0, time] with no gaps. Two clips join seamlessly when one ends exactly where the next begins. If the event cannot be fully covered, return -1.
Examples
Constraints
- `1 <= clips.length <= 100`
- `0 <= start <= end <= 100`
- `1 <= time <= 100`
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.