Max Area of Island You are given an m x n binary matrix grid . An island is a group of 1 ‘s (representing land) connected 4-directionally (horizontally…
You are a Backend Engineer at DoorDash and realized that your service can no longer keep up with traffic. In order to deal with the increased load, your…
Given a string containing uppercase characters A-Z, remove pairs of adjacent characters if they are consecutive characters in the alphabet (for example,…
We are writing software to analyze logs for toll booths on a highway. This highway is a divided highway with limited access; the only way on to or off o…
Create an employee directory structure that stores employee information for a company. Include manager direct reports. Implement the following functions…
You are asked to design a playlist shuffle system that keeps track of the last N played songs and ensures that a new song is not played again until N ot…
Sending Terminal Hardware (Part 1) Stripe operates in many countries and sends out payment terminal hardware through different shipping methods based on…
Problem Statement: Design a video lifecycle management system. A video may consist of different stages during its life cycle: Uploaded to TikTok Encoded…
Given a string num that contains only digits and an integer target , return all possibilities to insert binary operators + , – , or * between the digits…
The input is a string containing open and close parentheses. Find the minimum number of parentheses that need to be added in order to balance the input…
I have a file with the following format, each line: startIP, endIP, cityName . Question: Write a function that takes as input an IP address and outputs…
Data Processing Pipeline: n tasks — tasks have ids [0,1,2,…,n-1]. Task Ti depends on task Tj — [Ti, Tj] — task Ti cannot start unless task Tj has fini…
Given an array of distinct integers candidates and a target integer target , return a list of all unique combinations of candidates where the chosen num…
Given a starting node in a directed graph of immutable nodes, find a set of nodes that either: have an IP address, or can reach a node having an IP addr…
LRU Map Design a data structure that supports storing key-value pairs and evicting the least recently used entry when capacity is exceeded. Implement th…
Guests may want to visit multiple cities during one trip. Hotels in these cities offer various prices for the different days within the guest’s trip. Yo…
Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same let…
Assigning Multiple Orders to a Dasher DoorDash optimizes Dasher efficiency by assigning multiple orders from nearby restaurants to the same Dasher. This…
Oncall shifts of people with start and end time Name | Start | End Adam | 10 | 100 Ben | 50 | 70 Cathy | 150 | 300 Diane | 60 | 120 We give a start and…
Imagine something like Ticketmaster or StubHub: the goal is to allow customers to book event tickets anytime, anywhere. 这道 Amazon VO 题本质上是在考一个在线购票平台的高层设…