Tap here to switch tabs
Problem
Submissions

Problem: Video Stitching

med
30 min
Try to solve the Video Stitching problem.

Statement

You are given an array of video clips clips where clips[i] = [start_i, end_i] indicates a clip that begins at start_i and concludes at end_i. You are also given an integer time.

Any clip can be cut into smaller segments. A collection of overlapping or touching clips can be joined together to span a continuous duration.

Determine the minimum number of clips required to fully cover the interval from 00 to time. If the entire interval cannot be covered, return −1-1.

Constraints:

  • 1≤1 \le clips.length ≤100\le 100

  • 0≤0 \le start_i ≤\le end_i ≤100\le 100

  • 1≤1 \le time ≤100\le 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Video Stitching

med
30 min
Try to solve the Video Stitching problem.

Statement

You are given an array of video clips clips where clips[i] = [start_i, end_i] indicates a clip that begins at start_i and concludes at end_i. You are also given an integer time.

Any clip can be cut into smaller segments. A collection of overlapping or touching clips can be joined together to span a continuous duration.

Determine the minimum number of clips required to fully cover the interval from 00 to time. If the entire interval cannot be covered, return −1-1.

Constraints:

  • 1≤1 \le clips.length ≤100\le 100

  • 0≤0 \le start_i ≤\le end_i ≤100\le 100

  • 1≤1 \le time ≤100\le 100