Implement a function that merges multiple sorted integer streams into a single sorted list. interface SortedIntegerStream { int next(); // get the integ…
Imagine that each state is assigned a number of votes as follows: Alabama = 9 Alaska = 3 Arizona = 11 Arkansas = 6 … Wyoming = 3 For the purpose of th…
Run Tests Background Often at Google, there are tests that are resource intensive and long-running, which makes them difficult to use as pre-submit test…
When someone drags their finger across a phone’s keyboard, we can record the letters they intersected, creating a swype path . Given a swype path and a…
You and a friend have received a special gold chain as a gift. The chain links each have an integer weight, not necessarily the same. You and your frien…
Given k calendars, a meeting duration, and bounds, return a list of possible time slots where the meeting can be scheduled. Input timeout: 3 Input log:…
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…
In Google Shopping, we have products identified by a unique id. Each product can have multiple offers associated with it, and each offer has a correspon…
Imagine you have an RPC server that produces a log of entries, and you’re analyzing it offline. There are two entries for each call: one when the RPC st…
Given a string num that contains only digits and an integer target , return all possibilities to insert binary operators + , – , or * between the digits…
I have a file with the following format, each line: startIP, endIP, cityName . Question: Write a function that takes as input an IP address and outputs…
Input is a list of numbers representing the temperature of a city in the past few years. Please compute the average and median temperature given a time…
Design a data structure that supports the following operations: push(x) : pushes an integer x onto the stack pop() : removes and returns the most freque…
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…
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…
Write a function which, given an array of integers, returns the length of the longest subsequence where every next value is 1 bigger than the previous o…
Input: [1 10 6 7 9 8 2 4 3 5] Output: How many people can the last one in line see? Clarification: A person A can see another person B in front of them…