The ocean is to the right of the buildings. A building has an ocean view if the building can see the ocean without obstructions. Formally, a building ha…
Consider a deck of normal playing cards. A playing card is represented as a string, where the first part represents the rank (one of Ace A, 2, 3, …, 1…
Build a simple endpoint that can filter by a time range, user, and currency. Some example use cases here would be to display some sort of transaction hi…
After creating an account, you will be assigned a unique access key. To authenticate with the ipapi API interface, simply append your access_key paramet…
Imagine you have an RPC server that produces log entries and you’re analyzing it offline. There are two entries for each call: one when the RPC starts a…
Interval Insertion You are given a set of non-overlapping intervals sorted by their start times, and another interval to insert. Insert the new interval…
Given a list of meetings, where a meeting has a start and an end time, determine the minimum number of rooms required to schedule all the meetings witho…
We’re going to try to build the start of a document search engine. Our search engine should take in a static list of documents — long alphanumeric, lowe…
S3 is a publicly accessible HTTP service. It supports PUT of a key (URL) that stores a value. It supports GET that retrieves the value. The goals of S3…
Implement the backend side of a user management page. Given two user lists, one is the current database and the other is a list of possible changes. The…
Background Today Axon offers a Records Management System (RMS) tailored for police agencies, designed to handle the management of police records. One cr…
Write a function that takes a string input. The string will be a file path name (for example, /usr/bin ). The path may contain special directories . (re…
Implement a trie (prefix tree) with the following methods: Trie() initializes the trie object. void insert(String word) inserts the string word into the…
Given a company tree, calculate how many managers are paid less than the average salary of their direct and indirect employees? For example, consider th…
Given a sorted array arr = [1, 2, 3, 10, 11, 12] , find k = 3 closest elements around target m . 这道题的核心是在有序数组中找出与目标值 m 距离最近的 k 个元素。由于数组已经排好序,通常可以先用二分定位目…
You are given a list of log messages, each associated with some source file which emitted them. struct LogMessage { string source_file; string message;…
Given a data stream of CPU utilization values as doubles: 10.0 , 20.5 , 35.0 , 45.0 , 20.0 , 19.0 , 18.5 , … Find the median of the data stream. The e…
Imagine you’re interacting with Alexa. When you command Alexa to “acquire a certain item”, it begins to retrieve information from a variety of sources,…
Find the maximum common divisor by repeatedly merging the largest two numbers. Question description Given a list A containing n numbers, repeatedly sele…