Amazon Interview Questions
- 0of 0 votes
AnswersFind if a given number can be expressed in the form of p^q, where p and q are integers
- xyz_coder February 06, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm Coding - 0of 0 votes
AnswersFind all palindromes in a given string. Single letters are also considered as palindromes.
- xyz_coder February 06, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm Coding - 1of 1 vote
AnswersGiven a number A, find the smallest number which has only 1s and 0s as its digits which divisible by the number A. For example: if the given number A is 4, the smallest number with 1s and 0s is which is divisible by 4 is 100.
- xyz_coder February 06, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm Arrays Coding - 0of 0 votes
Answershow will you start debugging a issue in Newspaper app
- qe.expert February 05, 2015 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersHow would a test a Online Editor?
- qe.expert February 05, 2015 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswersHow would you start debugging a Newspaper app (Web, Mobile, Desktop)
- qe.expert February 05, 2015 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswersHow would you test a Online Editor?
- qe.expert February 05, 2015 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswersHow do you debug RSS Feed Ticker app
- qe.expert February 05, 2015 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswersGiven a list of email list, find all email addresses that are in all the email list.
- 00101011 February 04, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Intern Algorithm - 0of 0 votes
AnswersYou're the guard of a prison, you want to keep an eye on the most dangerous prisoner. Each prisoner has a danger rank of his own and a group of friends (prisoners, who also have danger ranks). The guard has a list of prisoners with their corresponding danger ranks and he also has a list of the friends of each of the prisoners in the prison.
- Sai February 03, 2015 in United States
The danger rank is computed as follows: Prisoner 1 has a danger value of 5, his friends are Prisoner 2 and Prisoner 5, who have danger values of 3 and 4 respectively. So the danger value of Prisoner 1 is 5+3+4 = 12.
There could be any number of prisoners. Whichever prisoner has the highest value is the most dangerous(computed using the above method).
Friendship can be assumed to be symmetric.
Come up with an efficient algorithm to find the most dangerous prisoner?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 2of 2 votes
Answers{{
- skc25pma February 02, 2015 in India
There are 3 machines M1, M2 and M3. Each machine is 90% full of its capacity with integers. Now you have to sort all the integers combined and then store the first 1/3rd in M1, second 1/3rd in M2 and last 1/3rd in M3.
Your objective is to minimize the number of sort operations and number of data transfer operations.
Each sort operation/data transfer operation is counted as 1 irrespective of the count of values that are being sorted/transferred.
}}| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm Coding Sorting - 0of 0 votes
AnswersEntry in the log file is like this:
- openhealth2014 February 01, 2015 in United States
User 1 visited Page 4
User 3 visited Page 2
User 7 visited Page 9
.
.
.
Design an efficient data structure which supports queries like the following:
Which page was visited by exactly 2 users in day?
Which page was visited by only one user exactly 2 times in a day?
Which page was visited by ‘User 3? more than 5 times in a day?| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswerDesign a system for finding the costliest element always whenever we pick up an element from a box.(concept of Max Heap)
- openhealth2014 February 01, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersEntry in the log file is like this:
- openhealth2014 February 01, 2015 in United States
User 1 visited Page 4
User 3 visited Page 2
User 7 visited Page 9
.
.
.
Design an efficient data structure which supports queries like the following:
Which page was visited by exactly 2 users in day?
Which page was visited by only one user exactly 2 times in a day?
Which page was visited by ‘User 3? more than 5 times in a day?| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 2of 2 votes
AnswersGiven N scientists and K black holes, each scientist can query on radius, size and temperature of a black hole, what data structure would you use?
- openhealth2014 February 01, 2015 in United States
Following queries are important.
Which scientist had queried on which black hole.
What were the queries made by that scientist.| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersIn a tennis tournament of N players every player plays with every other player.
- openhealth2014 February 01, 2015 in United States
The following condition always hold-
If player P1 has won the match with P2 and player P2 has won from P3, then Player P1 has also defeated P3.
Find winner of tournament in O(N) time and O(1) space. Find rank of players in O(NlogN) time.| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 1of 1 vote
AnswersWrite code for scheduling algorithms for such a cab services provided you have a list of future bookings, and list of cabs in your fleet.
- openhealth2014 February 01, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersIn an auctioning system, the bidder with the highest bid wins but charged at kth highest price. Develop a system for it. Solved it using a hashmap. Was asked to write a code for the same.
- openhealth2014 February 01, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersDesign a system which would make a schedule for a user to complete a book in given number of days. A pre condition is that the schedule for every day should end at the end of some chapter.
- openhealth2014 February 01, 2015 in United States
Ex – 3 chapter with 10 pages each and user has to complete this book in 2 days, then the schedule should be either be 2 chapters on first day and 1 chapter on second or 1 chapter on first day and 2 chapters on second. (code)| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersFind the top k frequent items in a stream of numbers .
- Rahul Sharma January 29, 2015 in India| Report Duplicate | Flag | PURGE
Amazon Software Engineer - -1of 1 vote
AnswersSuppose you receive 10 million mails in 10 seconds. How will you process them and find what might be the reasons to receive these many mails. Discuss different approaches to find the reasons.
- Rahul Sharma January 29, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersYou have a binary search tree and you have to return the two nodes such that there sum i equal to ‘K’. Pseudo code is to be given.
- tihor January 26, 2015 in India
O(n)time & O(n) sppace is easy but challenge O(n) time & O(1) space.| Report Duplicate | Flag | PURGE
Amazon Java Developer Algorithm - 0of 0 votes
AnswersHow would you implement an algorithm for Decision Tree Algorithm - Machine Learning? How would you store records for a feature. Mention all the data structure you would use to make your work easy.
- Rao N January 26, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Intern - 1of 3 votes
AnswersYou are given a 2D Array that contains only 0s and 1s in sorted order. i.e. First Os and then 1s.
- tihor January 24, 2015 in India
Array:
0 0 0 1
1 1 1 1
0 0 1 1
0 1 1 1
You have to figure out the row that contains maximum number of 1s.
e.g. in above case we have row 2 as the answer.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersYou have a file with 100 billion URLS, find first unique URL.
- aks January 19, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 1of 1 vote
AnswersDesign a data structure for following operations in O(1) time.:
- aks January 19, 2015 in India
insert
remove (FIFO)
find MODE| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersDesign an LRU cache, where you remove an element not only by time lapsed since last used but also by a cost associated with each element. F(t, c) is a method to find weight for each element. Where c is cost and t is time since last used.
- aks January 19, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
AnswersImplement DFS
- Mumbaiya_Chori January 19, 2015 in India for Machine learning
After I implemented this, I was told to implement it without recursion. He told me to write pseudo code. I wrote it using stacks.| Report Duplicate | Flag | PURGE
Amazon SDE1 - 1of 1 vote
AnswersGiven a matrix (0,0 is to the botto9m left like co-ordinate system)of 0s and 1s and two co-ordinates find if there is a path between them, Also you can only travel via 1s and you can only go up or right.
- Mumbaiya_Chori January 19, 2015 in India for Machine learning
Answer: Backtracking algorithm| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
Answersgiven K sorted arrays merge them
- Mumbaiya_Chori January 19, 2015 in India for Machine learning
Answer: Told him how to do using merge of merge sort. He wanted me to do another approach I googled later you can use min heap for it.| Report Duplicate | Flag | PURGE
Amazon SDE1