← Intuit Interview Insights

Intuit·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Quick coding screen for a software engineer role at Intuit. One question, pretty straightforward, nothing that'll keep you up at night.

Questions Asked (1)

Q1

Write a function that takes a directory path and returns the maximum file size found anywhere under that directory, including subdirectories.

Algorithms & Data Structures
Author's notes

Recursive file traversal.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and edge cases, then outline a recursive depth-first traversal that tracks the maximum file size. Discuss trade-offs between recursion and iteration, and mention handling of symbolic links and permission errors.

Pro tip: Mention that you would use an iterative approach with an explicit stack to avoid recursion depth limits on deep directory trees, and that you would handle symbolic links carefully to prevent infinite loops.

1. Clarify requirements and edge cases

Ask about handling of symbolic links, permission errors, empty directories, and whether to follow symlinks. Confirm expected return value if no files exist.

2. Choose traversal strategy

Decide between recursive DFS or iterative BFS/DFS. Consider using os.walk (Python) or equivalent for simplicity, but be prepared to implement manually.

3. Implement traversal and track max size

Walk through all entries, check if each is a file, and update the maximum size. Handle errors gracefully (e.g., skip unreadable files).

4. Analyze complexity and optimize

Discuss time complexity O(n) where n is number of files/directories, and space complexity O(d) for recursion depth or explicit stack. Mention potential optimizations like early termination if a known maximum is provided.

5. Test with edge cases

Mention testing with empty directory, single file, nested directories, symlinks, and permission-denied scenarios to ensure robustness.

Key Points to Mention

  • Recursive vs iterative traversal and trade-offs
  • Handling symbolic links to avoid infinite loops
  • Error handling for permission denied or inaccessible files
  • Time and space complexity analysis
  • Using built-in libraries like os.walk or pathlib for clarity
  • Edge cases: empty directory, no files, very deep directory structure

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