FastPrepCoordinate Bounding Box
Problems/Coordinate Bounding Box

Coordinate Bounding Box

Upstart logoUpstart● EasyFULLTIMEOA
QuestionFunctionExamples

Problem statement

Given a list of two-dimensional points (x, y), return [minX, minY, width, height], where width = maxX - minX and height = maxY - minY.

Function

boundingBox(points: int[][]) → int[]

Examples

Example 1

points = [[2,5],[-1,3],[4,9]]return = [-1,3,5,6]

The minimum corner is (-1,3). The width is 4 - (-1) = 5, and the height is 9 - 3 = 6.

More Upstart problems

  • Babysitter Quote with Hourly RatesONSITE INTERVIEW · Seen Oct 2026
  • Maximum SubarrayONSITE INTERVIEW · Seen Oct 2026
  • Buffet Day GainsOA · Seen Sep 2026
All Upstart interview questionsSee Upstart hiring insights
Saved
public int[] boundingBox(int[][] points) {
  // write your code here
}
Checking account…