Applied Intuition Coding & Algorithms 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 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 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 ...
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 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 ...