← Upstart Interview Insights

Upstart·Software Engineer·Online Assessment (OA)·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Took an online assessment for a software engineer role at Upstart. One coding problem, 40 minutes, grid traversal. Did not go well.

Questions Asked (1)

Q1

Given a 2D grid, find a compromised server by navigating the grid using a function that takes a column, row, direction (one of 8 possible), width, and height. You have a maximum number of attempts.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

My approach moved exactly one step per call and passed two test cases, but the large data cases all timed out.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem constraints and the API's behavior, then design a search strategy that efficiently covers the grid within the attempt limit. Consider systematic traversal patterns (e.g., spiral, zigzag, or binary search) and discuss trade-offs between coverage and attempts.

Pro tip: Always ask about the distribution of compromised servers and whether the function provides feedback (e.g., distance or direction hints) to tailor your search. Also, mention that you would write unit tests for edge cases like 1x1 grids or maximum attempts.

1. Clarify the problem

Ask questions to understand the grid dimensions, the function's return values, and what 'compromised' means. Confirm the maximum attempts and whether there are multiple compromised servers.

2. Define the search space

Model the grid as a graph or matrix and identify possible search patterns. Consider if the function gives any hints (e.g., 'hotter/colder') to guide the search.

3. Choose an algorithm

Select an algorithm that balances coverage and attempts, such as binary search on rows/columns, spiral traversal, or random sampling with replacement. Justify your choice based on constraints.

4. Analyze complexity

Calculate worst-case attempts and time complexity. Discuss if the algorithm guarantees finding the server within the limit or if it's probabilistic.

5. Discuss trade-offs and edge cases

Compare alternative approaches (e.g., exhaustive vs. heuristic) and mention edge cases like empty grid, server at corners, or attempts exhausted.

Key Points to Mention

  • Time and space complexity of the search algorithm
  • Handling of 8 directions and boundary conditions
  • Use of binary search or divide-and-conquer if applicable
  • Probabilistic vs. deterministic guarantees
  • Optimization for maximum attempts
  • Testing strategy and edge cases

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