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…
Description You are given an array of integers that represent the height of apartment buildings. The leftmost building is at index 0 , and the array lis…
Fuse Lidar and Camera Obstacles You are given two lists of obstacles detected by different sensors: lidar_obstacles and camera_obstacles . Each obstacle…
Finding Fish Card Game V2 (Base Code Available) Description To do this, we will provide code that lets us simulate a deck of cards and players. If you a…
The Unix find command allows you to search for files under a given directory. You can specify criteria for files you are interested in. Imagine that you…
You are a developer for a university. Your current project is to develop a system for students to find courses they share with friends. The university h…
Prison Break Description A prisoner is planning to escape from prison! The prison’s gate consists of horizontal and vertical bars that are spaced one un…
Given a binary tree, compute the diameter of the tree. The diameter is the longest path between any two nodes in the tree. 这道题要求计算二叉树的直径,也就是树中任意两点之间最长路径…