cswork / libraryOpen practice workspace

Interview experiences · Upstart

Upstart Software Engineer Interview Experience — Three OA Questions, Stuck on a Grid-Search Timeout

OAInterviewed 2026-04

There were three questions in total, and two of them hadn't shown up in any interview reports before. Given a list of coordinates (x, y), find the min x, min y, max_x - min_x, and max_y - min_y. The problem statement was basically: filter out (name, score) pairs where the score is above a threshold, keep everything below the threshold, then find the max score among what's left and return its name…

There were three questions in total, and two of them hadn't shown up in any interview reports before.

  1. Given a list of coordinates (x, y), find the min x, min y, max_x - min_x, and max_y - min_y.
  2. The problem statement was basically: filter out (name, score) pairs where the score is above a threshold, keep everything below the threshold, then find the max score among what's left and return its name.
  3. This one gave 40 minutes. I only passed two test cases and couldn't get the large test data to pass — I wasn't even sure how the grading was supposed to work.

The gist of it was: you're given a grid, and within a max-attempt limit you need to find the "compromised" server.

solve(x, y, direction, width, height) — x is the column, y is the row, and direction is a string representing one of the eight directions on the grid (down, up, left, right, up-right, down-right, up-left, down-left).

My solution was to move one step for each given direction, but that didn't pass the large test data. In the last two minutes it suddenly hit me — maybe the idea was that for a given direction, I should recursively keep moving inside the function until I couldn't move anymore, then return the final coordinates?

Either way, I failed the last four test cases and couldn't figure out what they actually wanted. I tried using a visited set to avoid re-walking cells, but the problem doesn't seem to involve revisiting cells anyway, since the large test case just kept going down-right the whole time — and it just timed out.

I'm guessing I failed this one. Sharing my report to help everyone else out.

Comments

Nothing here yet.

Join in on CSWork →