Given a grid of land heights. For example: start 6 5 4 5 5 4 2 5 1 1 5 5 2 1 5 2 3 2 4 4 5 4 5 5 6 end The upper-left corner is the start cell, and the…
Systems Design – Car Share Rental App We are building a car sharing rental app that enables users who want to rent a car to find users who have personal…
Given an integer, swap at most one pair of digits to make the largest possible integer. Example: 43183 -> 83143 Swap 4 and 8. 这道题要求你只允许交换一次数字中的一对位置,使结果尽…
Write a query to find the total value of sales and the number of unique paying customers, grouped and sorted in descending order by payment type. Existi…
Design a notification system that receives notification requests and sends notifications to users through phone or email. The system should be scalable,…
Problem: Meeting Room Scheduler Background: A company has multiple meeting rooms. Employees want to book these rooms for meetings. Your task is to build…
Longest Substring Without Repeating Characters Given a string, find the longest substring that does not contain any repeated characters. Example 1: Inpu…
Given a list/array of strings, find and group together all strings that are “buddies” with one another. You may use any data structure of your choosing…
The stock span problem is a financial problem where we have a series of N daily price quotes for a stock and we need to calculate the span of the stock’…
We have a job definition as follows: from __future__ import annotations from dataclasses import dataclass from typing import List @dataclass class Job:…
No Pairs Allowed Description For each word in a list of words, if any two adjacent characters are equal, change one of them. Determine the minimum numbe…
Given an integer array nums , rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output:…
Given 2 dates in the format yyyy/mm/dd , return the number of days between them. Do not use any library; parse it manually. Consider leap years and diff…
Given a list, e.g. [“apple”, “banana”, “ant”, …] , with an input prefix, find all the words starting with the prefix from the above list. Examples: pr…
def format_data_for_modelling(schema, training_data, label_data): Takes in a list of headers, a training data set and info on the eventual outcome (a.k….
Write a function that returns the smallest nonnegative number which can be generated by using all the digits with odd values of a given number. Example:…
Design a key-value store with snapshot support. Implement the following functions: void put(string key, string value) void delete(string key) string get…
Implement a channel (like the Golang primitive) that can be used for communicating between threads, such that all data sent will become available for re…
Sampling profilers are a performance analysis tool for finding the slow parts of your code by periodically sampling the entire call stack. In this probl…