Implement a mock client for testing. Do not rely on its behavior in your implementation. class MockClient implements Client { // These numbers are for t…
You are given an array of integers. Implement a class that can support the following operations: Get the sum of elements in a specific index range Updat…
Design a Donations Website Donations Website Features: Users donate to charity Donation confirmations Donations paid to charity Design a website to coll…
Given a dictionary of words and a pair of words. For the pair, display the possible word chain using the input as the starting and ending words. Print a…
Problem 1: Given a budget of $3000 dollars to buy Apple products, create an algorithm to print all possible combinations of products you can buy. Given…
Given a list of strings, find the groups of strings that can be rotated to each other (so each character is changed by the same distance). Input: [‘abc’…
Design a system that allows DoorDash’s consumers to add reviews on ordered food items. Consumers will earn rewards ($) based on the quality of the revie…
Given an array of integers that is an arithmetic progression missing one integer, return the missing integer. Example: [1, 2, 4, 5] -> 3 这道题的核心是等差数列缺项定位…
Implement a program that finds the shortest path of links between one Wikipedia URL and another. You can imagine the final result is something similar t…
You are given an array of events where events[i] = [startDayi, endDayi] . Every event i starts at startDayi and ends at endDayi . You can attend an even…
Given a collection of strings, write a function that can group the anagrams together. You can return the answer in any order. Test collection: [“able”,…
Merge Intervals Given an array intervals representing a collection of intervals, where each interval is intervals[i] = [start, end] , write a function t…
You are given an array prices where prices[i] is the price of a given stock on the i -th day, and an integer fee representing a transaction fee. Find th…
Question: You are walking on a 2D map contoured with various heights of land that accumulates water when it rains. Specifically, when the rainwater heig…
Given an array of integers nums and an integer target , return indices of the two numbers such that they add up to target . You may assume that each inp…
Query: use the query to match the key. Key: label of each data slice. Value: the data itself. 1. Compute the similarity between query and key. query [1…