Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 4,651–4,675
Given n airports and a list of flights [from, to, passengers], compute the total traffic for each airport (sum of arrivals and departures) and return…
General practice
Companies: Databricks
Companies: Microsoft
Given members and their purchase records (and possibly a category precedence or timestamp), determine each member's store category by aggregating their transactions and…
General practice
Given the original and updated global rankings of the same set of participants, determine how much the ranking changed by measuring flipped relative orders (i.e.…
General practice
The coding questions were ~LC hard with follow-ups. Interviewers were great, collaborative, helpful. It was extremely helpful to practice "hard" level questions while reasoning…
Companies: Snap
Companies: OpenAI
Coordinate five concurrent threads arranged in a ring that must each acquire two adjacent shared resources (forks) before calling the provided eat callback, ensuring mutual…
General practice
Given n players paired each round as i-th from front vs i-th from end (with a middle bye if odd) and winners reseeded by original…
General practice
Given sequential task completion logs with implicit start times (first at 0), compute each task's duration (current leaveTime minus previous leaveTime) and return the employee…
General practice
Given a list of daily temperature records per city (city, date, temperature), determine for each city the earliest date on which that city's maximum recorded…
General practice
The first was leetcode Set Matrix Zeroes. The LeetCode problem Set Matrix Zeroes is a classic 2D array manipulation problem. The description is as follows…
Companies: NVIDIA
Find the centre (the element at index (n−1)/2 of the sorted array) and return any k elements with the largest "strength", where strength = |x…
General practice
Given an m×n binary matrix where each row's 1s appear before 0s, return the indices of the k weakest rows ordered by increasing number of…
General practice
Find the k-th lexicographically smallest length-n string over {a,b,c} with no two adjacent characters equal, or return empty if fewer than k exist. Use combinatorial…
General practice
Find a sequence of knight moves that visits every square of an N×N chessboard exactly once (a Hamiltonian path/cycle in the knight-move graph), typically from…
General practice
Return the k-th smallest positive divisor of n (or -1 if n has fewer than k divisors). The core challenge is enumerating divisors in ascending…
General practice
Given a table of user login timestamps, return each user's most recent login timestamp that occurred in 2020 (exclude users with no 2020 logins); the…
General practice
Given unsorted bus departure times and passenger arrival times with a per-bus capacity, sort and simulate buses in chronological order filling them with the earliest…
General practice
Given a grid maze where a ball, when moved in any direction, keeps rolling until it hits a wall (it cannot stop mid-roll), compute the…
General practice
Given a maze where a ball rolls in a chosen direction until it hits a wall or drops into a hole, find the shortest-distance path…
General practice
Given a table of customer orders, compute for each customer the product(s) they ordered the most times — returning all products tied for the highest…
General practice
Given a table of orders, return the most recent order for each product by grouping or partitioning by product and selecting the row with the…
General practice
For each customer, return their three most recent orders from an orders table, ranked by order date (with ID as a tie-breaker). The core challenge…
General practice