PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Amazon

Design a File Searcher With Symbolic Links

Last updated: Jul 28, 2026

Quick Overview

Design an in-memory file searcher that filters regular files by suffix and size while optionally following symbolic links. Define deterministic paths and inclusive boundaries, then handle cycles, aliases, broken links, permissions, concurrent mutation, streaming results, and the distinction between an entry and its underlying object.

  • medium
  • Amazon
  • Software Engineering Fundamentals
  • Software Engineer

Design a File Searcher With Symbolic Links

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Design an in-memory file-system searcher. The file-system graph contains directories, regular files, and symbolic links. A query selects regular files by optional suffix and a size range. Traverse from a supplied root and return matching paths in deterministic order. ### Constraints & Assumptions - Directories contain named child entries. - Regular files have a byte size. - A symbolic link refers to another node and may create a cycle. - Multiple paths may reach the same node. - The caller chooses whether symbolic links are followed. ### Clarifying Questions to Ask - Should results identify directory entries or underlying file objects? - Are suffix checks case-sensitive? - Are size boundaries inclusive? - How should broken links and permission failures be reported? ### What a Strong Answer Covers ```premium-lock What a Strong Answer Covers ``` ### Follow-up Questions - Search a real filesystem without holding all results in memory. - Support concurrent directory mutation. - Explain when a visited-node set can incorrectly suppress a desired alias path.

Quick Answer: Design an in-memory file searcher that filters regular files by suffix and size while optionally following symbolic links. Define deterministic paths and inclusive boundaries, then handle cycles, aliases, broken links, permissions, concurrent mutation, streaming results, and the distinction between an entry and its underlying object.

Related Interview Questions

  • Explain BIOS and UEFI Firmware Mechanisms - Amazon (hard)
  • Design a Concurrent Restaurant Waitlist and Seating System - Amazon (easy)
  • Implement an Accessible Autocomplete Search Component - Amazon (medium)
  • Debug Watch List Movie Operations - Amazon (medium)
|Home/Software Engineering Fundamentals/Amazon

Design a File Searcher With Symbolic Links

Amazon logo
Amazon
Jul 10, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
0
0

Design an in-memory file-system searcher. The file-system graph contains directories, regular files, and symbolic links. A query selects regular files by optional suffix and a size range. Traverse from a supplied root and return matching paths in deterministic order.

Constraints & Assumptions

  • Directories contain named child entries.
  • Regular files have a byte size.
  • A symbolic link refers to another node and may create a cycle.
  • Multiple paths may reach the same node.
  • The caller chooses whether symbolic links are followed.

Clarifying Questions to Ask Guidance

  • Should results identify directory entries or underlying file objects?
  • Are suffix checks case-sensitive?
  • Are size boundaries inclusive?
  • How should broken links and permission failures be reported?

What a Strong Answer Covers Premium

Follow-up Questions Guidance

  • Search a real filesystem without holding all results in memory.
  • Support concurrent directory mutation.
  • Explain when a visited-node set can incorrectly suppress a desired alias path.
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.