Amazon frequently offers product bundles to customers, where multiple related products are combined and sold together at a discounted price. The goal is…
Implement a function that takes numbers a and b in string form and returns the result of a * b as a string. The input can only contain digits [0-9] or a…
Given a Binary Search Tree (BST) and a positive integer k , find the k th largest element in the Binary Search Tree. For example, in the following BST,…
We are working on a security system for a badged-access room in our company’s building. Given an ordered list of employees who used their badge to enter…
Assignment: Write a piece of code which takes a single-channel grayscale image as an input and rotates it by 90 degrees. 这道题要求对一张单通道灰度图像进行 90 度旋转,本质上是对二…
Consider streaming services like Max, Netflix, and Hulu. The companies developing these services provide media content to a wide array of users on diffe…
Two integer operations are defined as: ADD_1 : Increment the integer by 1 MULTIPLY_2 : Multiply the integer by 2 Given an integer value k , determine th…
Auction feature on Instagram People can create auction posts and add products People can bid on products When the auction ends, people can buy the produ…
Given a set of transactions between users and an initial balance per user, output the final balance per user. Note that each transaction denotes the pay…
Weather Challenge Information For this interview, we’d like you to add some new functionality to an existing system. There are a few things we’d like to…
You are running a reservation-only restaurant. You already know how many parties have booked for today, and you need to arrange the required number of t…
You are given a network of n nodes represented as an n x n adjacency matrix graph , where graph[i][j] == 1 means the two nodes i and j are connected, an…
Write a program that allows the user to calculate the price of a pizza. A pizza has: a base a size toppings Assume the system stores everything in memor…
You’re creating a change counting system for a new automated Amazon cash register that Amazon plans to launch internationally. Your change counting syst…
Cache Design Design a cache that supports the following two basic operations: set(id, object) : store an object by its id; get(id) : retrieve an object…
You will design and build a word predictor. This word predictor will take some text as training data. You need to provide an API which accepts a word as…
Imagine you have a robot that sends status messages that humans will read in real time. The raw messages are hard to read for a human because there are…