← Ramp Interview InsightsSoftware Engineer

Ramp·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Ramp technical screen for a software engineering role, basically one big graph traversal problem with a bunch of moving parts layered on top of each other. The problem itself was interesting but dense, and I spent a lot of time thinking through edge cases I hadn't considered upfront.

Questions Asked (1)

Q1

You're given a root URL that returns a JSON node in a directed graph. Each node can have outgoing URLs, optional passkeys, and sometimes a terminal message. Traverse the graph to find the terminal node, collecting passkeys along the way and attaching them as headers to subsequent requests. Handle HTTP errors appropriately (retry on 503/504, treat 404 as a dead end), avoid cycles, and return the full path plus the terminal payload. Walk through your approach including BFS vs DFS tradeoffs.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This one took me a minute to fully parse.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a traversal algorithm (BFS or DFS) with cycle detection and error handling. Discuss tradeoffs between BFS and DFS, and how to manage passkeys and headers. Finally, describe how to reconstruct and return the path and terminal payload.

Pro tip: Mention that you would use a visited set to avoid cycles and a queue/stack to manage traversal, and explicitly state how you'd handle retries with exponential backoff for 503/504. This shows you think about robustness and real-world API behavior.

1. Clarify requirements and constraints

Ask about graph size, depth, expected error rates, and whether passkeys are cumulative or per-branch. Confirm the output format: full path and terminal payload.

2. Choose traversal strategy (BFS vs DFS)

Discuss BFS for shortest path and level-order processing, DFS for memory efficiency on deep graphs. Consider iterative implementations to avoid stack overflow.

3. Handle passkeys and headers

Explain how to collect passkeys from each node and attach them as headers to subsequent requests. Clarify if passkeys are inherited or need to be merged.

4. Implement error handling and cycle detection

Describe retry logic for 503/504 with exponential backoff, treating 404 as a dead end. Use a visited set to avoid cycles, and handle other HTTP errors gracefully.

5. Reconstruct and return path and terminal payload

Maintain parent pointers or a path list during traversal to reconstruct the full path once the terminal node is found. Return the path and the terminal message.

Key Points to Mention

  • BFS vs DFS tradeoffs: BFS finds shortest path but uses more memory; DFS uses less memory but may not find shortest path.
  • Cycle detection using a visited set to avoid infinite loops.
  • Retry logic for 503/504 with exponential backoff and jitter; 404 as dead end.
  • Passkey management: collecting and attaching as headers, possibly merging with existing headers.
  • Path reconstruction using parent pointers or maintaining a path stack/queue.
  • Handling of other HTTP errors (e.g., 500, 401) and timeouts.

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