Ray
BAN USER
- 0of 0 votes
AnswersGiven a large file with sentences and query string, design a system (Class, data structs, functions, etc) and algorithm to return the smallest window (start and end offsets) in the input file where the query words (in any order) are seen in the text file. What is the time complexity?
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer System Design - 0of 0 votes
AnswersGiven a list of files. Return all the unique lines from all files.
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - -4of 4 votes
AnswersFind the coordinates of the rectangle which is parallel to axis and has minimum area.
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 0of 0 votes
AnswersSuppose you have a stream of (timestamp, tag) events. You need to filter this stream (online), leaving only events with tags that haven't been already encountered in the last X seconds.
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 0of 0 votes
AnswersDesign a system which takes in latitude and longitude and returns back closest 5 locations.
- Ray in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer System Design - -1of 1 vote
AnswersYou are given a series of moves as a string, such as ">^V<^". You need to output a list with all the series of moves that represent a loop if they were made by a robot for example.
- Ray in United States
A loop is defined as a series of moves that lead to the same position, for example "><" or "^V".
In the case of "^>V<^" the output should be ["^>V<", "^>V<"], essentially the last move generates a new loop because it leads to a position that was visited before and that naturally can be followed up to the same position and describe a loop.| Report Duplicate | Flag | PURGE
Software Engineer Algorithm - -1of 1 vote
AnswersYou have a bidimensional space of area N that contains a circle of area M that could be placed anywhere in this space. What is the optimal way of finding the circle, drawing lines, considering you have a function that can tell you if a line is intersecting the circle?
- Ray in United States| Report Duplicate | Flag | PURGE
Software Engineer Algorithm - 0of 0 votes
AnswersYou have 10^9 user, 10^3 websites that users are subscribed to and 2000 servers. Some users will unsubscribe from certain websites. How would you architect this system to be scalable and performant?
- Ray in United States| Report Duplicate | Flag | PURGE
Google SDE1 System Design - 0of 0 votes
AnswersBest Time To Sell Stock but with 1 restriction: after you sell your stock, you cannot buy stock on next day.
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 1of 1 vote
AnswersDesign a locking mechanism for a distributed system .
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Software Design - 0of 0 votes
AnswersHow can you read from disc such that you optimize the latency of the data read/writes?
- Ray in United States| Report Duplicate | Flag | PURGE
Google SDE1 Computer Architecture & Low Level - 0of 0 votes
AnswersConsider a setup where a program is continuously receiving floats as inputs (a stream of numbers). Write a method that at any given time returns a moving average. That is the average of the last K numbers received. If the method is called before the program has received K numbers, simply return the average of however many numbers have been received thus far.
- Ray| Report Duplicate | Flag | PURGE
Google Jr. Software Engineer Algorithm - 0of 0 votes
AnswersGiven an active stream of sorted arrays, how would you merge them efficiently?
- Ray in Canada| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 2of 2 votes
AnswersWhat is the fastest way to compute cube root?
- Ray in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersImplement ReentrantLock using simple locks.
- Ray| Report Duplicate | Flag | PURGE
Google SDE1 Threads - 0of 0 votes
AnswersDesign a unique hash function for every tweet in Twitter which will be used as part of a service.
- Ray in United States| Report Duplicate | Flag | PURGE
Twitter SDE1 Hash Table - 0of 0 votes
Answers(x-1)! % x = -1 in efficient way.
- Ray in United States| Report Duplicate | Flag | PURGE
SDE1 Math & Computation - 0of 0 votes
AnswersHow does Google know that you are who you say you are?
- Ray in United States| Report Duplicate | Flag | PURGE
Adobe SDE1 System Design - 1of 1 vote
AnswersYou have a chess board of size NxN. You have a horse at a given starting position. You also have a function that gives you all the positions that the horse can reach from it's current position.
- Ray
Given an ending position, find the path to it that uses the minimum number of moves.| Report Duplicate | Flag | PURGE
Microsoft SDE1 Algorithm - 3of 5 votes
AnswersGiven a Binary Tree (balanced or not) write a method that transforms the tree in a degenerate tree (basically a data structure like a sorted linked list where each node has the left child null) and returns the new root. This must be made in place, no external memory usage is allowed.
- Ray in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Trees and Graphs
Can you explain your thought process a little bit? @divm01986
- Ray April 11, 2017