← Intuit Interview Insights

Intuit·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Intuit technical screen for a software engineer role, one coding problem the whole time. The problem was graph-based and felt pretty applied, like something you'd actually build for a product feature rather than a pure leetcode grind.

Questions Asked (1)

Q1

Given a set of business-to-business relationships (undirected edges) and a source and target business, find the shortest path between them and return both the path and the degree of separation, where degree is defined as the number of intermediate nodes on that path.

Algorithms & Data StructuresSystem Design
Author's notes

BFS was the right move and I knew that pretty quickly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the businesses as nodes and relationships as undirected edges in a graph, then use BFS to find the shortest path from source to target. Reconstruct the path using parent pointers and compute the degree of separation as the number of intermediate nodes (path length minus 2).

Pro tip: Clarify edge cases upfront—like when source equals target (degree 0) or no path exists—and mention that BFS is optimal for unweighted graphs, showing you understand complexity trade-offs.

1. Clarify requirements and edge cases

Confirm the graph is unweighted and undirected, and discuss edge cases such as source == target, disconnected nodes, and multiple shortest paths.

2. Choose BFS for shortest path

Explain that BFS guarantees the shortest path in an unweighted graph, with O(V+E) time and space complexity.

3. Implement BFS with parent tracking

Use a queue for traversal and a parent map to record the predecessor of each visited node, enabling path reconstruction.

4. Reconstruct path and compute degree

Backtrack from target to source using the parent map to build the path, then calculate degree as the number of intermediate nodes (path length minus 2).

5. Analyze complexity and test

State time and space complexity, and walk through test cases including normal, edge, and no-path scenarios.

Key Points to Mention

  • BFS is optimal for unweighted graphs to find shortest paths.
  • Use a queue for BFS and a parent map (or array) to reconstruct the path.
  • Degree of separation = number of intermediate nodes = path length - 2.
  • Handle edge cases: source == target (degree 0), no path (return empty path and -1 or null).
  • Time complexity O(V+E), space complexity O(V) for visited and parent structures.
  • If multiple shortest paths exist, any valid one is acceptable; mention if a specific one is required.

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