FastPrepSmallest Point with Maximum Inclusive Interval Overlap
Problems/Smallest Point with Maximum Inclusive Interval Overlap

Smallest Point with Maximum Inclusive Interval Overlap

Grab logoGrab● MediumNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report says intervals include both ends, and clarifies that endpoints can span the full signed 32-bit range. It does not say which point to return when several points tie, so this version returns the smallest one. Our version is about 97% the same as the reported question.

Given a nonempty array of inclusive integer intervals [left, right], return the smallest integer point contained in the maximum number of intervals.

An interval contains x when left <= x <= right. Endpoints may be any signed 32-bit integer, including Integer.MAX_VALUE.

Function

smallestMaximumOverlapPoint(intervals: int[][]) → int

Examples

Example 1

intervals = [[1,4],[2,5],[4,6]]return = 4

Point 4 belongs to all three intervals.

Example 2

intervals = [[-3,-1],[0,2]]return = -3

The maximum overlap is one everywhere in the intervals, so the smallest covered point is -3.

Constraints

  • 1 <= intervals.length <= 100000.
  • Each row contains exactly two integers left <= right.
  • Endpoints are in the full signed 32-bit range.

More Grab Phone Screen questions

  • Movie LRU CachePHONE SCREEN · Seen Jan 2026
  • Minimum Operations to Halve an Array SumPHONE SCREEN · Seen Nov 2021

Similar questions at other companies

  • Merge IntervalsApple · OA · PHONE SCREEN · ONSITE INTERVIEWApple interview questions
  • Merge Overlapping IntervalsAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
  • Peak Chat Load Across AgentsCresta · PHONE SCREENCresta interview questions
  • Meeting Rooms IIeBay · PHONE SCREENeBay interview questions
  • Meeting Rooms IIByteDance · PHONE SCREENByteDance interview questions
  • Majority Labels over Audio IntervalsNooks · PHONE SCREEN
  • Meeting Rooms IIUber · PHONE SCREENUber interview questions
  • Merge IntervalsGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Merge Overlapping IntervalsFurtherAI · PHONE SCREEN
  • Peak Resource Usage Across Weighted IntervalsTekion · PHONE SCREENTekion interview questions
All Grab interview questionsSee Grab hiring insights
Saved
class Solution {
    public int smallestMaximumOverlapPoint(int[][] intervals) {
        // Write your code here.
    }
}
Checking account…