Search⌘ K
AI Features

Solution: Minimum Interval to Include Each Query

Solution: Minimum Interval to Include Each Query gives you intervals and query values. Return an array with the smallest interval size containing each query, or negative one when none does.

Statement

You are given a 2D integer array, intervals, where each element intervals[i] = [lefti, righti][left_i, \space right_i] represents the ithi^{th} ...