← Intuit Interview Insights

Intuit·Software Engineer·Technical Phone Screen·Intermediate

IntermediateRejected
Jun 2026

Summary

Interviewed for a software engineer role at Intuit and got a graph problem involving business relationship data. Had the right general idea but couldn't close it out under pressure, which was a rough way to find out my coding practice had some gaps.

Questions Asked (2)

Q1

Given business relationship data from a financial platform, implement a function that finds the degrees of separation between two businesses using the shortest path between them.

Algorithms & Data StructuresAdaptability & Ambiguity
Author's notes

The problem description was intentionally vague on argument and return types, so I had to ask clarifying questions before writing anything.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: model the business relationships as an undirected graph where nodes are businesses and edges represent relationships. Then, explain that BFS is ideal for finding the shortest path in an unweighted graph, and outline the algorithm step-by-step, including handling edge cases like disconnected graphs or non-existent businesses.

Pro tip: Mention that BFS guarantees the shortest path in unweighted graphs, and discuss how you would handle large-scale data by considering bidirectional BFS or precomputation if the graph is static. This shows awareness of performance and scalability, which is crucial for financial platforms like Intuit.

1. Clarify the problem

Ask questions to confirm assumptions: Are relationships bidirectional? Is the graph unweighted? What should be returned if no path exists? This demonstrates adaptability and ensures you understand the requirements.

2. Model as a graph

Represent businesses as nodes and relationships as edges. Choose an adjacency list for efficient traversal, especially if the graph is sparse.

3. Choose BFS for shortest path

Explain that BFS explores level by level, guaranteeing the shortest path in an unweighted graph. Outline the BFS algorithm: queue, visited set, and distance tracking.

4. Handle edge cases and complexity

Discuss cases like same business (0 degrees), disconnected components (return -1 or null), and analyze time/space complexity (O(V+E)).

5. Optimize and scale

Mention potential optimizations like bidirectional BFS for large graphs, or caching results if queries are frequent. This shows forward-thinking and adaptability.

Key Points to Mention

  • Graph representation: adjacency list vs. adjacency matrix, and why adjacency list is preferred for sparse graphs.
  • BFS algorithm details: queue, visited set, distance array, and how to reconstruct the path if needed.
  • Time and space complexity: O(V+E) time, O(V) space, and how it scales with data size.
  • Edge cases: same business, no connection, invalid input, and how to handle them gracefully.
  • Alternative algorithms: DFS (not optimal for shortest path), Dijkstra (for weighted graphs), and bidirectional BFS for performance.
  • Real-world considerations: data freshness, dynamic updates, and potential for precomputation or indexing.

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

Q2

Why would you choose BFS over DFS for finding the shortest path between two nodes?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Follow-up after I proposed BFS.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that BFS explores nodes level by level, guaranteeing the shortest path in unweighted graphs, while DFS may find a path but not necessarily the shortest. Then discuss trade-offs like memory usage and graph characteristics, and mention that for weighted graphs, algorithms like Dijkstra's are needed.

Pro tip: Acknowledge that BFS uses more memory (O(V) for the queue) but is necessary for shortest path in unweighted graphs; for weighted graphs, suggest Dijkstra's algorithm to show depth. This demonstrates you understand practical constraints and can choose the right tool.

1. Define the problem

State that the question is about finding the shortest path in an unweighted graph, where each edge has equal cost.

2. Explain BFS guarantee

Describe how BFS explores nodes in increasing order of distance from the source, so the first time it reaches the target, it's via the shortest path.

3. Contrast with DFS

Explain that DFS goes deep along one branch and may find a longer path first; it doesn't guarantee shortest path unless you exhaust all paths.

4. Discuss trade-offs

Mention that BFS uses more memory (queue of frontier nodes) while DFS uses less, but BFS is necessary for shortest path in unweighted graphs.

5. Extend to weighted graphs

Note that for weighted graphs, BFS doesn't work; algorithms like Dijkstra's (which is BFS-like with a priority queue) are needed.

Key Points to Mention

  • BFS explores level by level, ensuring shortest path in unweighted graphs.
  • DFS may find a path but not necessarily the shortest.
  • Time complexity: both O(V+E) for traversal, but BFS stops early when target found.
  • Space complexity: BFS O(V) queue, DFS O(V) stack (but often less in practice).
  • For weighted graphs, use Dijkstra's algorithm (BFS with priority queue).
  • BFS is optimal for unweighted graphs; DFS is better for topological sort, cycle detection, etc.

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