Practice questions for 300+ companies, plus questions candidates reported from their interviews.
11,568 questions · 341 companies · 1,114 reported by candidates
Showing 11,568 results
An agent workflow is a directed graph of states with latency weights on edges. Find the minimum total latency from a start state to a goal state that passes through every state in a small required set (at most 10), or return -1 if impossible.
Each node in a singly linked list has a next pointer and a random pointer that may point to any node in the list or be null. Return a deep copy whose pointers reference only new nodes, ideally with O(1) extra space.
Given feed posts' quality scores in ranked order, return for each post how many posts ranked after it have a strictly lower score.
Each undirected network link between services has a probability of delivering a message successfully, independent of the others. Return the highest success probability of any path from src to dst, or 0 if dst is unreachable.
Queue items arrive at known times with known processing durations, and robots take items in FIFO order, each item going to whichever robot frees up first. Find the smallest number of robots such that every item completes within an SLA of its arrival, or return -1 if no count works.
Estimate how many Stories are posted to Instagram in the United States on a typical day. Walk through your assumptions and sanity check the result.
Given a series of daily prices for one stock and an integer k, find the maximum profit achievable with at most k buy-then-sell round trips, holding at most one share at a time.
Implement a sequence of characters as an unrolled linked list, where each node holds a small array of up to B characters. Support get(i), insert(i, ch) and delete(i), splitting full nodes and merging sparse neighbors.
Capital One's marketing team wants to test a new bidding algorithm for paid search ads on card keywords by splitting campaigns into treatment and control. Explain why the two arms can interfere in the ad auction and design a cleaner test.
Given bridges with priority and MAC address and a list of point-to-point links with port names and costs, compute the 802.1D spanning tree result: the root bridge, each non-root bridge's root port, the designated port on every link, and which ports are blocked.
Describe a time a bug in code or data you owned produced wrong results that others relied on. How did you find it, communicate it and prevent a recurrence?
Tell me about a time a forecast or estimate you owned turned out to be badly wrong, what it cost, and what you changed.
A Google Docs experiment shows documents edited per user rising from 10.0 to 10.2. A PM wants to say 'a 2% lift' with a confidence interval. Show how to compute a CI for a relative lift and explain why it is not just the absolute CI divided by the control mean.
Order bursts arrive at known millisecond timestamps, and the exchange gateway can send at most r orders per millisecond. Find the smallest integer r so that every order is sent by a given deadline.
Each delivery job takes one time slot, has a deadline slot by which it must be completed, and earns a profit. With one driver who does one job per slot, choose jobs to maximize total profit.
All hashtags in a list are anagrams of each other. Two hashtags are similar if they are equal or one becomes the other by swapping two letters, and similarity is extended transitively into groups. Return the number of groups.
A seller gets a cashback amount for each day they run a flash sale, but platform rules forbid running sales on two consecutive days. Given the cashback per day, return the maximum total cashback.
Given a heartbeats table (camera_id, received_at), where online cameras check in every minute, and a cameras table (camera_id, org_id), compute for one day each org's number of cameras that went offline, number of outages, and total offline minutes, where an outage is a gap of more than 5 minutes between heartbeats.
Describe a time you noticed something in a project that could create a security, privacy or regulatory problem and raised it even though it put a deadline or a stakeholder's plan at risk.
Trackside AEI readers emit repeated RFID reads of the same rail car as it rolls past or sits nearby. Given a list of (timestamp, reader_id, car_id) reads, keep a read only if no kept read of the same car at the same reader happened in the previous 60 seconds.
Get the full picture with our company interview guides.
Tell us what you were asked. Get 1 AI interview credit for each approved report.