Applied Intuition Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Delete duplicate files via DFS
Question LeetCode 609. Find Duplicate File in System – Implement an algorithm (using DFS/backtracking) to delete files with duplicate content in a fil...
Find duplicate files by size
Question LeetCode 609. Find Duplicate File in System — find duplicate files using file size instead of content comparison https://leetcode.com/problem...
Find grid cell minimizing sum distances
You are given an m x n 2D grid with k marked points. Movement is allowed in four directions (up, down, left, right) with unit cost per step. Find a gr...
Design a transactional in-memory key–value store
Implement an in-memory key–value store that supports transactions. The system must process these commands: ( 1) SET key value — assign or overwrite a ...
Debug a GPT training pipeline
Fix three bugs in a minimal GPT to meet a training-loss target You are given a Colab notebook with a minimal GPT-style language model implemented in P...
Implement KV cache for inference
Design Task: Key–Value Cache for Transformer Decoder Inference Context You are building an autoregressive inference engine for a Transformer decoder-o...
Explain potential reason for PIP risk
Behavioral Prompt: Self‑Assessment, Early Signals, and Risk Mitigation Context You are interviewing for a Software Engineer role. Imagine you accept a...
Walk through a recent project design
System Design: End-to-End Project Walkthrough Provide a structured walkthrough of a recent project you led end-to-end. Organize your answer using the ...
Implement correct attention masking
Autoregressive Transformer: Correct Attention Masking with Padding Context: You are implementing decoder self-attention for an autoregressive Transfor...
Design a coupon pricing engine
Design and implement a coupon application engine for a shopping cart. Each Item has id, category, and unitPrice. A Coupon has: applicableCategories (o...
Design a nested transaction store
Implement an in-memory key–value store that supports nested transactions with the operations: SET key value, RETURN key, BEGIN, APPLY (commit current ...
Implement transactional key–value store
Design and implement an in-memory key–value store that supports transactions and nested transactional blocks. Your system must process a stream of com...
Design a job scheduler
Design a Scalable Distributed Job Scheduler Context Design a multi-tenant, horizontally scalable job scheduler for backend services. The system must p...
Implement a nested object validator
Implement a helper function validate(object, required_style) that checks whether a possibly nested object matches a provided schema. The object may co...
Implement and explain positional encoding
Implement Positional Encodings for a Transformer Language Model You are building a Transformer-based language model. Transformers are permutation-equi...
Describe past research and interests
Behavioral Prompt: Research Experience, Methods, Impact, and Roadmap Alignment Context You are interviewing for a Machine Learning Engineer role in a ...
Explain motivation and background
Behavioral Phone Screen — Software Engineer Context You are in a technical phone screen for a Software Engineer role. Expect concise, high-signal beha...
Design duplicate-file detection using size
You are given a large POSIX-like filesystem containing millions of files across nested directories. Design an algorithm to find groups of duplicate fi...
设计目录去重算法并优化
在一个包含多级目录与文件的文件系统中,每个文件有路径与内容。请设计算法删除内容完全相同的重复文件,仅保留每组中的一个,并返回被删除文件的完整路径列表。要求: - 使用 DFS 与回溯遍历目录树; - 说明如何比较文件内容以判定重复,确保正确性(例如文件大小预筛、分块读取、内容哈希); - 处理异常情...
Design event timeout detector
Design and implement an event-timeout detector for a job scheduler. Inputs: a global timeout T and a stream of events; each event has {event_id, type ...