Discuss
Interview experiences, the questions people were asked, and salaries, shared by software engineers. 817 posts so far.
-
Myntra: Largest histogram rectangle under a cap after removing one bar
Problem. You get an array of building heights and an integer M. Remove exactly one building, then find the largest rectangle area in the remaining skyline whose area is no more tha
-
Walmart Global Tech: Count islands in a grid, then count only distinct island shapes
Problem. You get a 2D grid of land and water cells. First, count the islands, where an island is a group of land cells connected horizontally or vertically. Follow up twist. Change
-
Cohesity: Append a 100 GB file to another 100 GB file
Problem. You have two files of 100 GB each. Append one to the end of the other. What the candidate discussed. Read the source in chunks sized to the RAM you have, and write each ch
-
Coinbase: Live leaderboard: kth-highest score with score updates and user removal
Problem. Scores arrive continuously. Support these operations: Add a score for a user. Re adding an existing user counts as an update. Return the current kth highest score. Remove
-
Coinbase: Minimum days to run tasks in a fixed order with a per-type cooldown
Problem. You get a sequence of tasks and a cooldown n . Two tasks of the same type must run at least n days apart, while different types have no restriction. You can run at most on
-
Tekion: Longest run of ones if you can flip up to k zeros
Problem. Given a binary array and a number k, find the longest stretch of consecutive 1s you can get if you are allowed to flip at most k 0s to 1s. What happened. It was the second
-
Josh Technology Group: Pair sum in a BST without a stack or list
Problem. Given a binary search tree and a target, find all pairs of nodes whose values add up to the target. Constraints given. You may not use a stack or a temporary list to hold
-
Josh Technology Group: Cascading removal of adjacent letter pairs
Problem. Given a string, remove any two adjacent characters that are consecutive letters like b and c or circular neighbours z and a . After a removal, the characters that become n
-
Affirm: Fraud detector that spreads suspicion through shared personal details
Problem. A stream of events arrives. Underwriting events carry personal details such as address, phone, email and SSN. Fraud flag events mark details as fraudulent. For each underw
-
Rubrik: Backup dependency graph with recovery chains and retention-based expiry
Problem. Model a backup system in which backups depend on one another for example, an incremental backup relies on an earlier one . Every backup carries an end time and a retention
-
Affirm: Payment processing for installment loans with a one-hour bank window
Problem. Design a system that collects payments on installment loans. Assume the user and an active loan exist; user and loan APIs can be stubbed. Requirements. Accept payments sta
-
MongoDB: Alert when migrated records miss a lag deadline
Problem. Records are being migrated from a primary database to a second datastore. An event fires when a record leaves the primary and another when it arrives in the target. The ma
-
MongoDB: Versioned document store with out-of-order writes
Problem. Build a small datastore with two operations. put docId, contents, timestamp saves a version of a document at a timestamp. One document can have many versions, and puts may
-
BharatPe: Notification system with priorities and bursts
Problem. Design a system that sends notifications to users. What was probed. The trade offs in your design choices. How priority notifications get through ahead of normal ones. Wha
-
Nuro: Play a video at a fixed 25 fps with non-thread-safe read and render
Problem. You have a Frame class and a VideoPlayer with two calls: read returns the next frame or signals the end of the video, and render frame draws a frame. Implement on play cli
-
Dropbox: Retention rate of January signups in February (SQL)
Problem. You have a users table with each user's join date and an engagement table that logs user activity. Find the percentage of users who joined in January 2021 and were also ac
-
Paytm: O(1) LRU cache, then thread safety and why not a built-in linked map
Problem. Implement a least recently used cache with get and put , both in O 1 time. When the cache is full, inserting a new key evicts the entry that was used least recently. Edge
-
PhonePe: Merchant settlement system with T+1 payouts and a daily ledger
Problem. Design the system that settles money to merchants. Requirements. Each transaction is settled on T+1, after the platform's commission is taken out A merchant can see a ledg
-
PhonePe: DAG workflow engine with parallel tasks, retries and execution logs
Problem. Build a workflow execution engine in the spirit of Apache Airflow. A workflow is a directed acyclic graph, and each node is a task. The engine works out a valid run order
-
CRED: Flight booking with per-seat pricing and no double sale across resellers
Problem. In a two hour onsite, lead the design of a flight booking platform from scratch. Areas covered. 1. Functional and non functional requirements, scope and assumptions 2. Dom