← Applied intuition Interview Insights

Applied intuition·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Interviewed for a software engineering role at Applied Intuition and got a coding question that was a twist on a classic LeetCode problem. The variation kept me on my toes more than I expected.

Questions Asked (1)

Q1

Given a file system represented as a list of directory strings, find all duplicate files. Instead of comparing file contents, use file size as the basis for identifying duplicates.

Algorithms & Data StructuresSystem Design
Author's notes

I knew the original problem so my first instinct was to group by content hash, then I had to mentally recalibrate because they wanted size-based grouping instead.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the input format and constraints, then propose a hash map keyed by file size to group files, and finally identify groups with more than one file as potential duplicates. Discuss trade-offs and edge cases, and consider scalability for large file systems.

Pro tip: Mention that size-based detection is a heuristic and may produce false positives; suggest a follow-up step like hashing file contents for verification if needed. This shows awareness of real-world trade-offs.

1. Clarify Requirements and Assumptions

Ask about the input representation (e.g., list of full paths, directory tree), whether file sizes are readily available, and if false positives are acceptable. Confirm that the goal is to group files by size, not to verify actual duplicates.

2. Design the Algorithm

Propose using a hash map where keys are file sizes and values are lists of file paths. Iterate through all files, retrieve each file's size, and append its path to the corresponding list. Finally, collect all lists with more than one file as duplicate groups.

3. Analyze Complexity and Scalability

State that time complexity is O(N) for N files, assuming file size retrieval is O(1). Space complexity is O(N) for storing the map. Discuss how this scales for large file systems and potential memory optimizations.

4. Address Edge Cases and Trade-offs

Consider empty files, files with same size but different content, symbolic links, and permission issues. Acknowledge that size-based grouping may yield false positives and suggest optional content hashing for verification.

5. Summarize and Extend

Recap the approach, emphasizing its simplicity and efficiency. Optionally, discuss extensions like parallel processing, distributed file systems, or using a database for very large datasets.

Key Points to Mention

  • Use a hash map (dictionary) to group files by size.
  • Time complexity O(N) and space complexity O(N).
  • False positives: files with same size may not be duplicates; consider content hashing for verification.
  • Edge cases: empty files, symbolic links, permission errors.
  • Scalability: handle large file systems with streaming or external sorting.
  • Clarify input format and assumptions before coding.

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