Search⌘ K
AI Features

Minimum Interval to Include Each Query

Explore how to determine the smallest-sized interval that includes each query value from a list of intervals. This lesson helps you understand interval coverage, comparison of interval sizes, and how to return minimum interval sizes or -1 when no interval contains the query. You will develop skills to analyze intervals and queries effectively for coding interviews.

Statement

You are given a 2D integer array, intervals, where each element intervals[i] = ...