← Early-stage Startup Interview Insights

Early-stage Startup·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026Remote

Summary

Got an interactive API maze problem for a software engineer screen, which I was not expecting at all. No LeetCode, just a live HTTP endpoint you had to explore programmatically and figure out as you went.

Questions Asked (1)

Q1

You are given an HTTP API endpoint representing a maze. Write a program that makes GET requests to explore it, parses each response to determine the next move, and continues until you receive a terminal response, then outputs the final location.

API & IntegrationsAlgorithms & Data StructuresAdaptability & Ambiguity
Author's notes

The weird part is there's no spec.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the API contract—request format, response schema, and terminal condition—then outline a BFS-based exploration strategy that tracks visited states to avoid cycles. Emphasize robust error handling, rate limiting, and a clean separation between HTTP client, maze state, and pathfinding logic.

Pro tip: Before writing any code, ask if you can hit the endpoint manually (e.g., with curl) to inspect the actual response shape—this reveals hidden fields like walls, start position, or move costs that aren't in the prompt. Also, mention that you'd add logging and a dry-run mode to debug without spamming the API.

1. Clarify the API contract

Ask about the endpoint URL, HTTP method, request/response format (JSON?), and what constitutes a terminal response. Confirm if there are rate limits, authentication, or stateful sessions.

2. Design the exploration algorithm

Choose BFS for shortest path in an unweighted maze, or DFS if memory is constrained. Maintain a visited set of positions to avoid infinite loops and track the path taken.

3. Implement the HTTP client and parser

Write a function that sends GET requests with the current position, parses the JSON response to extract available moves, walls, and terminal flag. Handle network errors with retries and exponential backoff.

4. Integrate and handle edge cases

Combine the client and algorithm in a loop: request, parse, update state, choose next move, repeat until terminal. Handle cases like no valid moves, unexpected response codes, or malformed JSON.

5. Test and validate

Test with a mock server or recorded responses to verify logic. Add logging to trace each step and ensure the final output matches the expected terminal location.

Key Points to Mention

  • BFS vs DFS trade-offs for maze exploration (shortest path vs memory)
  • Visited set to prevent cycles and redundant requests
  • Robust error handling: retries, timeouts, and rate limiting
  • Separation of concerns: HTTP client, response parser, pathfinding logic
  • State management: tracking current position, path history, and terminal condition
  • Testing strategy: mock server, unit tests for parser, integration test for full flow

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