sde
Interview Date
17-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
PART 1: ALGORITHMIC PROBLEM - IN-MEMORY FILE SYSTEM BASE PROBLEM You are tasked with designing a basic in-memory file system. Task: Design a class FileSystem that supports the following operations: ls(path): If it is a file path, return a list containing only the file's name. If it is a directory path, return the list of file and directory names in this directory. mkdir(path): Makes a new directory according to the given path. The given directory path does not exist. If the middle directories in the path do not exist, you should create them as well. addContentToFile(filePath, content): If filePath does not exist, creates that file containing given content. If filePath already exists, appends the given content to original content. readContentFromFile(filePath): Returns the content in the file at filePath. What data structures (e.g., Trie, Hash Maps) will you use to represent the hierarchical structure of files and directories efficiently? FOLLOW-UP 1 Your file system is now being accessed by thousands of concurrent threads. Multiple users might try to read and write to the same file or directory simultaneously. Task: How do you handle concurrency to prevent data corruption? Discuss the implementation of read-write locks. How would you ensure that a user can read a file in /user/docs/ while another user is concurrently creating a new file in the same /user/docs/ directory without causing deadlocks? FOLLOW-UP 2 The file system has grown too large to be entirely lost if the server restarts or crashes. Task: You need to add persistence to your in-memory file system. Discuss how you would implement a Write-Ahead Log (WAL) or snapshotting mechanism. How do you serialize the hierarchical in-memory data structure efficiently so it can be reconstructed quickly upon server reboot? PART 2: AI DISCUSSION & TERMINOLOGY Practical Application & Tool Use: When integrating an AI API (like OpenAI or Anthropic) into a production application, how do you handle rate limits, unexpected latency spikes, and potential API outages in your system design? General Knowledge: What is the difference between "Training" a model and running "Inference" on a model? Which phase requires more computational power and why? Basic Terminologies (Briefly explain the following concepts): Transformers: The underlying neural network architecture that powers modern Large Language Models. It processes entire sequences of data simultaneously (in parallel) rather than sequentially, allowing it to understand long-range context in text. AI Alignment: The field of AI research focused on ensuring that artificial intelligence systems are aligned with human values and goals. It aims to prevent models from behaving deceptively, generating harmful content, or pursuing unintended objectives. Prompt Drift: A phenomenon where a prompt that used to work perfectly on an AI model suddenly starts returning degraded or wildly different results because the underlying model was silently updated or tweaked by the provider. Context Window: The maximum number of tokens (words or word pieces) that an AI model can process in a single request. This includes both the prompt you send and the response it generates. If you exceed this limit, the model will "forget" the oldest information.