Given the standard mapping from English letters to digits on a phone keypad, write a program that outputs all words that can be formed from an n-digit p…
Implement a caching reader for remote file access. A RemoteReader can read bytes from a server by offset and size. Your task is to implement CachingRead…
A = (M, K1) B = (K2, N) Given a util function matmul(X1, X2) , where X1 and X2 can only be tensors of shape (tile_size, tile_size) . Implement tiled_mat…
Given a string s containing just the characters ‘(‘ , ‘)’ , ‘{‘ , ‘}’ , ‘[‘ and ‘]’ , determine if the input string is valid. An input string is valid i…
Light Cells Activation Build a 3×3 grid of light cells (omitting the center cell) where you can click on the cells to activate them, turning them green….
Array a consists of distinct, positive integers and serves as a work array. Array rotate contains a list of integers that define operations on the work…
Problem statement Imagine that you want to schedule a meeting of a certain duration with a coworker. You have access to your calendar and your coworker’…
Complete the finestFoodOutlet function below. The function is expected to return a STRING . The function accepts the following parameters: STRING city I…
Question: Sellers buy items in Walmart during sale events and sell them on Amazon to make money. You have to help a seller make maximum profit for their…
You live in San Francisco city and want to minimize your commute time to the Databricks HQ. Given a 2D matrix of the San Francisco grid and the time as…
Top K Frequent Elements Description: Given a non-empty array of integers, return up to k most frequent elements. For example: Given [1,2,1,1,2,3] and k…
Calculate Shipping Cost Order: { “country”: “US”, // or “CA” for the CA order “items”: [ { “product”: “mouse”, “quantity”: 20 }, { “product”: “laptop”,…
Design a system that allows multiple users to collaborate on a document. Description For MVP, focus on: Defining back-end APIs for interaction between c…
Return the average of the values in a given range in a binary search tree. Example: [4,11] => avg(6,10,4,9) => return 7.xx 这道题要求在二叉搜索树中统计某个数值区间内所有节点的平均值…
Can we assume the input is sorted or not? You can sort by the start time of each interval. Merge the overlapping meetings with a loop over the meetings….
Description: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand, for example, [0,1,2,4,5,6,7] might become [4…
For each category, find the top 3 users with the highest total purchase amount. Input format: user_id, category_id, date, amount u1, retail, 20210101, 1…
Design a backend system for an e-commerce website that shows a list of merchandise. The system should focus on the browsing aspect, not on how to make p…