← Upstart Interview Insights

Upstart·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Short coding screen at Upstart for a software engineer role. Just one problem, nothing too wild, but it tripped me up more than I expected.

Questions Asked (1)

Q1

Given a list of coordinate points, return an array representing the bounding rectangle: the minimum x, minimum y, the total width, and the total height.

Algorithms & Data Structures
Author's notes

Took me a beat to realize they wanted width and height as differences, not the max values themselves.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the input format and edge cases first, then propose a single-pass O(n) solution that tracks min/max x and y. Compute width and height as max - min, and return the result in the specified order.

Pro tip: Mention that the bounding rectangle is axis-aligned and that width/height are differences, not counts. Also, discuss how you'd handle an empty input list, as it's a common edge case.

1. Clarify requirements

Ask about input format (list of tuples/objects), whether points are 2D, and what to return for an empty list. Confirm the order of output: [minX, minY, width, height].

2. Outline approach

Explain that you'll iterate through all points once, maintaining the minimum and maximum x and y coordinates. This yields O(n) time and O(1) extra space.

3. Handle edge cases

Discuss what to do if the list is empty (return empty array or throw error) or has one point (width and height are 0).

4. Compute and return

After the loop, calculate width = maxX - minX and height = maxY - minY. Return the array in the specified order.

5. Test with examples

Walk through a small example, like points [(1,2), (3,4)], to verify the output is [1,2,2,2].

Key Points to Mention

  • Time complexity: O(n) single pass
  • Space complexity: O(1) extra space
  • Edge cases: empty list, single point, negative coordinates
  • Axis-aligned bounding box assumption
  • Width and height as differences (max - min)
  • Return order: [minX, minY, width, height]

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.