Amazon wants to build a lottery system. When a customer purchases items worth between $1 and $100, they are entered into the lottery. Customers who purc…
An application running on Linux used to process 1000 requests per second. Now it is only processing 2 requests/second. How will you troubleshoot this is…
Problem Description We have a currency exchange requirement. Now we need to convert CNY to USD and hope to get as much USD as possible. Multiple exchang…
Amazon is releasing a feature called “Stuff Your Friends Are Buying” . Implement a function that returns stuff that a person’s friends are buying that t…
Write a program which takes an array of strings and a set of strings, and returns the starting and ending indices of a shortest subarray of the given ar…
When a consumer places an order with DoorDash, our ETA system provides them with an estimated delivery time window, for example, 5 minutes ~ 15 minutes…
Simulate a game on a 2D grid that is infinite to the left, right, and top, but bounded at the bottom. There are two players: Red, represented by R , and…
Given an array of integers and an integer k , for each element x in the array one can construct a slice of the array that includes x and k – 1 elements…
Hyperproof has a feature called Automated Controls Testing , where our users can write tests against data fetched from our Hypersyncs (integrations). Th…
Task: Implement the following problem Write a unit test for the implementation We want to implement an income calculator that, given a compensation pack…
Partition Array Such That Maximum Difference Is K You are given an integer array nums and an integer k . You may partition nums into one or more subsequ…
GET /api/bootstrap Request input: User Id Response: address, consumer, and payment data { “consumerId”: “1bef988e-e544-11ed-b5ea-0242ac120002”, “roles”:…
In a data cleaning pipeline, engineers optimize text datasets by alternately removing substrings: Alex removes substrings with an odd number of vowels i…
Given an unsorted array of integers nums , return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n)…
Restaurant Waitlist API Use your API to get a party from a FIFO waitlist. Your API needs to: add a party to the waitlist remove a party from the waitlis…
Online coding judge Registered users Contest has a start time and end time (next Sunday 10 AM to 5 PM PST) Upon start, users get access to 10 problems U…
Design a 1:1 Messaging App Requirements Conversations User sees a list of conversations, with the most recently active conversations first. Scrolling do…
Count Connected Components in a Binary Matrix Given a binary matrix, count the number of connected components formed by the cells with value 1 . Cells a…