Amazon Interview Questions
- 0of 0 votes
AnswerI applied online through Amazon page, and they contacted me right immediately like on that day which was scary for me. I guess they embody truly the culture of moving fast. I got an e-mail with to complete some online test with 13 questions and they were on:
- samworthington93 July 21, 2014 in United States for Operation
13 questions:
9 Analytical Multiple Choice Questions – focusing on sets, trend analysis, calculus, stats, etc.
1 open ended basic SQL question.
1 open ended normalization question.
1 Multiple Choice English language comprehension question.
1 open ended language question (this part should be 200 – 300 words).
The entire online assessment test was conducted through hackerrank.com and it was for 90 min.
Personally I did not go and complete the Quiz within couple of day. I did take my time to prepare and I was right. It is a difficult test. I did use apps like ‘the impossible interview’ and ‘the aptitude interview’ from iTunes app store to prepare. They were a help.| Report Duplicate | Flag | PURGE
Amazon Analyst - 0of 0 votes
AnswersWrite test cases for testing browser extension (chrome in particular)
- JG July 18, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Intern Testing - 2of 2 votes
AnswersGiven N sets of integers, remove some sets so that the remaining all sets are disjoint with one another. Find the optimal solution so that the number of sets remaining at the end is maximum
- Rahul Sharma July 12, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersWrite a pattern matching function using wild char
- Kavita July 07, 2014 in India
? Matches any char exactly one instance
* Matches one or more instances of previous char
Ex text = "abcd" pattern = "ab?d" True
Ex text = "abccdddef" pattern = "ab?*f" True
Ex text = "abccd" pattern = "ab?*ccd" false
if u need more sample input ask me| Report Duplicate | Flag | PURGE
Amazon Member Technical Staff - -1of 1 vote
AnswersWrite a longest palindrome substring in a given string using recursion..
- Kavita July 04, 2014 in India
int LPS(char* str, int n)| Report Duplicate | Flag | PURGE
Amazon Member Technical Staff - -2of 2 votes
AnswersWrite a longest common string function using recursion
- Kavita July 04, 2014 in India
int LCS(char* str1, int m, char* str2, int n)
interviewer was not interested in iterative approach
function prototype should be same| Report Duplicate | Flag | PURGE
Amazon Member Technical Staff - 4of 4 votes
AnswersTwo finite, strictly increasing, integer sequences are given. Any common integer between the two sequences constitute an intersection point. Take for example the following two sequences where intersection points are
- blackfever June 29, 2014 in India
printed in bold:
First= 3 5 7 9 20 25 30 40 55 56 57 60 62
Second= 1 4 7 11 14 25 44 47 55 57 100
You can ‘walk” over these two sequences in the following way:
1. You may start at the beginning of any of the two sequences. Now start moving forward.
2. At each intersection point, you have the choice of either continuing with the same sequence you’re currently on, or switching to the other sequence.
The objective is finding a path that produces the maximum sum of data you walked over. In the above example, the largest possible sum is 450 which is the result of adding 3, 5, 7, 9, 20, 25, 44, 47, 55, 56, 57, 60, and 62
this is the same problem which I saw in SPOJ Problem Set| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 1of 1 vote
AnswersA new Kindle feature is being developed to rank customers based on their reading speed.
- camiloa136 June 26, 2014 in Vancouver
A customer's "reading speed" is the maximum number of pages they have read in a single minute over the previous 10 minutes. Every minute, we will log the customer's current page, which can be used to calculate this speed. For example:
Current Time: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15]
Current Page: [0, 5, 6, 8,12,15,17,21,24,27,29,31,37,42,49,52]
Current Speed: [0, 5, 1, 2, 4, 3, 2, 4, 3, 3, 2, 2, 6, 5, 7, 3]
"Reading Speed": [0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 6, 7, 7]
We want to produce separate leaderboards for each book. Each customer will only read one book at a time, but multiple customers may read the same book.
Every minute, the "updateReadingSpeeds" method will be called to report each customer's reading progress. Please implement this method:
void updateReadingSpeeds(String customerID, String bookID, int pageNumber)
At any time, we should be able to request the full leaderboard for any book. Please implement the "printLeaderboard" method:
void printLeaderboard(String bookID)
The output should be CSV printed to standard output, like:
Customer ID,Reading Speed,Rank
Customer 1,5,1
Customer 3,4,2
Customer 2,4,3
Customer 5,2,4
*The updateReadingSpeeds method will be called every minute for every customer.
*CustomerID will uniquely identify a customer, bookID will uniquely identify a book
*Page numbers are integers between 0 and 1000000, and will never decrease over time.
*Customers who "tie" with the same reading speed can be ranked in any order.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersGiven A Binary Tree of size n , Find Out a Matrix M[n][n], where M[i][j]=1 if i is predecessor of j, else M[i][j]=0.
- gdg June 26, 2014 in United States
Try to do in better than O(N^2) time.| Report Duplicate | Flag | PURGE
Amazon Algorithm - 2of 2 votes
Answers(Bar Raiser Round)
- gdg June 26, 2014 in United States
Divide the array(+ve and -ve numbers) into two parts such that the average of both the parts is equal.
Input:
[1 7 15 29 11 9]
Output:
[15 9 1 7 11 29]
Explanation:
The average of first two elements is (15+9)/2 = 12, average of remaining elements is (1+7 +11 +29)/4 = 12| Report Duplicate | Flag | PURGE
Amazon Arrays - 0of 0 votes
AnswersReverse the alternate level nodes of the binary tree.
- singhvivekpes June 25, 2014 in United States
a
/ \
b c
/ \ / \
d e f g
/ \ / \ / \ / \
h i j k l m n o
Modified tree:
a
/ \
c b
/ \ / \
d e f g
/ \ / \ / \ / \
o n m l k j i h| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswersYou have a rabbit who wants to cross a river by jumping over the various rocks in it. All the rocks are in a straight line and the distance between them is also given. Your rabbit can only perform jumps of specific lengths. You have to output the minimum number of jumps required to cross the river (if possible). Rabbits can jump both in forward and backward direction.
- k.87.sharma June 25, 2014 in India
The number of rocks is M and the number of possible jump lengths is N.
For e.g. M=4 , N=2,
distance between m1-m2= 1
m2-m3= 2
m3-m4 =1
rabbit can perfrom jump of length 3 and 1.
output= 2 (minimum jump to cross the river)| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
AnswersGiven a singly linked list, modify the value of first half nodes such that 1st node’s new value is equal to the last node’s value minus first node’s current value, 2nd node’s new value is equal to the second last node’s value minus 2nd node’s current value, likewise for first half nodes.
- gdg June 24, 2014 in United States
(No extra memory to be used)| Report Duplicate | Flag | PURGE
Amazon - 1of 1 vote
AnswersYou have an array like ar[]= {1,3,2,4,5,4,2}. You need to create
- gdg June 21, 2014 in United States
another array ar_low[] such that ar_low = number of elements lower
than or equal to ar in ar[i+1:n-1].
So the output of above should be {0,2,1,2,2,1,0}
Time complexity : O(nlogn)
use of extra space allowed.| Report Duplicate | Flag | PURGE
Amazon - 1of 1 vote
AnswersMake a function that shows the common elements in two arrays. Part 2: With duplicates (small explanation). Part3: without duplicates
Answer:
- mikeldi10 June 19, 2014 in United States for Amazon Instant Videoint[] intersect(int[] array1, int[] array2){ if(array1.lentgh == 0 || array2.length == 0) return {}; Set<Integer> set = new HashSet<Integer>(); for(int i = 0; i < array1.length ; i++){ set.put(array1[i]); } List<Integer> list = new ArrayList<Integer>(); for(int i = 0;i < array2.length ; i++){ if(set.contains(array2[i])){ //map.put(map.get(array2[i])-1); //short explanation of how to do it with dupplicates set.remove(array2[i]); list.add(array2[i]); } } return list.toArray(); }
| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 2of 4 votes
AnswersHaving a table Genre with two colums (Id, Genre) make an SQL Query that finds the Ids with the genre Action and Comedy. (those will have multiple lines for each Id)
Answer:
- mikeldi10 June 19, 2014 in UK for Amazon Instant Videoselect g.id from (select id from genre where genre = 'Action') x, genre as g where g.id = x.id and genre = 'Commedy'
| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer SQL - 0of 0 votes
AnswersHow would you do to sort different files. All the data does not fit in memory.
- mikeldi10 June 19, 2014 in UK for Amazon Instant Video
Answered: Merge sort like method, where you sort each file. For the end merge, read some data from each file (make sure you have at least one from each file) and sort them| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a function to convert a string (char* that contains a number, e.g. "586") to int.
- Jason June 19, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 0of 0 votes
Answers2*45min interviews back-to-back. First interviewer asked two questions.
- Jason June 19, 2014 in United States
Given n*m fields of O's and X's, where O=white, X=black, for example
OOOXOOO
OOXXOXO
OXOOOXO
Return the number of black shapes. A black shape consists of one or more adjacent X's (diagonals not included). In the example, the answer is 3.
Write code (I chose C++). What data structures would you use to store the input, and what to use for the shapes? What is the runtime complexity?| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 0of 0 votes
AnswersHow would you sell me Amazon Web Services RDS, s3 and ec2?
- bradsacks2 June 15, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Sales Development Representative Sales - 0of 0 votes
AnswersGiven a number, you have to replace digits of the number with a given character 'a' and print all such possible strings(replacing only 1 digit or more at a time). The constraint is that no 2 consecutive digits should be replaced.
- amish.cusat June 14, 2014 in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer - 2of 2 votes
AnswersA string can contain 0 to n(input) number in sorted form find all the transition point.
- Nascent June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon - 2of 2 votes
Answersgiven a binary tree and a leaf node. holding a leaf node and whole tree falls down such that it is the new root of the tree. return the modified tree.
- Nascent June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon - 0of 0 votes
AnswersBase class is given you need to stop exposing the base class methods without touching the base class at all.
- hareendrareddy June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Java - 0of 0 votes
AnswersWhat happens when you enter URL in browser.
- suresh June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswersWrite a program to convert a decimal number into binary your code should work on both big endian and small endian machine. U have given a variable which tell u whether machine is big endian or small endian
- suresh June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswersGiven a graph, if we were to print all nodes within k hops of a given node, which algorithm would we use, the answer to this was obviously a Breadth first search. He followed it up asking, if one were to use Depth first search instead to code this problem instead, one would encounter bloated running times for Graphs with certain attributes (Perhaps Dense graphs or some such). Describe what types of graphs would a DFS algorithm falter with and why.
- suresh June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswersGiven a floor of dimensions 2 x W and tiles of dimensions 2 x 1, write code to find the number of ways the floor can be tiled.
- suresh June 07, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm