Research Scientist Interview Questions
- 0of 0 votes
AnswerWrite an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum.
- Nits January 30, 2020 in United States| Report Duplicate | Flag | PURGE
Akamai Research Scientist - 1of 1 vote
AnswersFind sets of values in array whose sum is equal to some number.
- blumer April 26, 2017 in United States| Report Duplicate | Flag | PURGE
Facebook Research Scientist Algorithm - 0of 0 votes
AnswersGiven the newest 100 entries of a person's facebook newsfeed. How would you rank the entries. The (for the user) most important ones should be ranked first. Which features would you use and how do you train/improve your model (machine learning)?
- nn862 February 28, 2017 in United States| Report Duplicate | Flag | PURGE
Facebook Research Scientist System Design - 0of 0 votes
AnswersGiven two numbers M and N, P is from [M,N] and Q is from [1,P-1]. Find all irreducible fraction of P/Q.
- rdahiya0213 August 16, 2016| Report Duplicate | Flag | PURGE
WorksApp Research Scientist - 4of 4 votes
AnswersYou are given two arrays of length M and N having elements in range 0-9.Your task is to create maximum number of length K from elements of these two arrays such that relative order of elements is same in the final number as in the array, they are taken from i.e. If two elements a,b are taken from array1 and and a comes before b in array1 so in the final number a should come before b (Relative order kept same) .
- Rahul Sharma November 18, 2015 in United States
Example: N=4 and M =6
Array1 = { 3 , 4 , 6,5}
Array2 ={9,1,2,5,8,3}
Suppose K = 5, then number will be {9,8,6,5,3}
You can see {9,8,3} are taken from array2 in the same order as they are in Array2. Similarly {6,5} are taken from Array1 in the same order and number 98653 is maximum possible number.| Report Duplicate | Flag | PURGE
Google Research Scientist Algorithm - 3of 3 votes
AnswersWrite a function to label connected components (using 4-connected neighbors) in a binary image.
- davydany August 01, 2014 in United States
You may use any language or data structures, but you may not use any existing APIs/libraries to find the components.
Example:
Input image
0 0 0 0 0 1 1 0 0 0
1 1 0 0 1 1 0 0 0 0
1 1 1 0 0 1 1 0 0 0
0 0 0 1 1 0 0 0 0 0
Output Image
0 0 0 0 0 1 1 0 0 0
2 2 0 0 1 1 0 0 0 0
2 2 2 0 0 1 1 0 0 0
0 0 0 3 3 0 0 0 0 0| Report Duplicate | Flag | PURGE
Amazon Research Scientist Algorithm - -1of 1 vote
AnswersAt your disposal you have 100 processing nodes. You have 1 billion rows of data which are located on the storage attached to one processor. All the processors can read from the storage of any other processor over a network. The objective is to sum one of the columns of the data set with minimum cost(time).
- careerup.quesions March 27, 2014 in United States
Cost summary
a. 0.01 unit(of time) to read 1 row of data from a local processor
b. 0.05 unit (of time) to read 1 row of data from a remote processor
c. 1000 units(of time) to partition the file into two pieces.
d. 0.1 unit(of time) to copy 1 row of data from a remote processor to a local processor
e. 1 unit(of time) to sum 1 row of data
What is the optimal configuration of the system to sum 1 column of the data file with the minimum cost(time)? Consider location of the data, the partitioning of the data, the number of processors to be used.| Report Duplicate | Flag | PURGE
Amazon Research Scientist Algorithm - 0of 0 votes
AnswersGiven an array, divide it into two parts for monte carlo simulations, with 80% of them as training and the rest as testing.
- rchala December 14, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Research Scientist Algorithm - 0of 0 votes
AnswersYou are given two arrays, how to you find the common elements in them?
- rchala December 14, 2013 in United States
My answer: Make a hashmap for one array with the entries as keys and their presence (0 or 1) as values. Then run through the elements of the other array to see which elements match.
Complexity: O(m+n) where m and n are the lengths of each array.| Report Duplicate | Flag | PURGE
Amazon Research Scientist Coding - 0of 0 votes
AnswersYou are given 2 convex hulls. Develop an algorithm to find all the common points; that is the points that lie in the intersection of these 2 convex hulls. Write code.
- Rahul Sharma November 21, 2013 in United States| Report Duplicate | Flag | PURGE
Samsung Research Scientist Algorithm - -3of 5 votes
AnswersTossing a coin ten times resulted in 8 heads and 2 tails. How would you analyze whether a coin is fair? What is the p-value?
- midtownguru November 01, 2013 in United States
In addition, more coins are added to this experiment. Now you have 10 coins. You toss each coin 10 times (100 tosses in total) and observe results. Would you modify your approach to the the way you test the fairness of coins?| Report Duplicate | Flag | PURGE
Google Research Scientist Probability - 1of 1 vote
AnswersIt was a pretty interesting question.
- b2010 September 25, 2013 in United States
Assume that you are given a fixed set of floating point numbers. Now given a new floating point number 'x', the goal is to efficiently find the number that is closest to 'x' from the fixed set. Question is: what data structure will you actually use for storing the fixed set of floating point numbers to achieve this?
Edit:
I missed to add. The interviewer further mentioned that I can not sort and that I can use any amount of time for creating the data structure (meaning this need not be efficient).
Since, I am not allowed to 'sort', I assumed that I can not use BST as I will have to compare numbers while populating the tree. But I didn't clarify it with him; I should have in hindsight.| Report Duplicate | Flag | PURGE
Amazon Research Scientist Data Structures - 0of 0 votes
AnswersYou have a dictionary, D, that stores the positions of words in a document by mapping words (strings) to positions in the document (arrays of ints.)
- brighama March 27, 2013 in United States
You also have a list of words, L.
Your job is to find the shortest sequence of words in the document that contains all the words in L.
E.g., if the document is "a b a c d x b a", then
D["a"] = [0 2 7]
D["b"] = [1 6]
...
If we are given that L=["a", "c", "x"]
Then we should return the start and end point of the shortest sequence that contains all words in L, which is (2, 5)
...the simple way is O(n^2) where n is the number of words in the document
...the way I came up with is exponential in |L|
...the interviewer had a way that was O(n)| Report Duplicate | Flag | PURGE
Amazon Research Scientist Algorithm