Search⌘ K
AI Features

Minimum Interval to Include Each Query

Understand how to find the minimum-sized interval that contains a given query from multiple intervals. This lesson guides you through analyzing intervals defined by their boundaries and applying logic to return the smallest containing interval size or -1 if none exists.

Statement

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