Amazon Interview Questions
- 0of 0 votes
Answers[System Design] Design a mobile application to provide nearest parking lot locations and availability?
- gmoh July 02, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon - 0of 0 votes
Answers[System-Design] Design air traffic control system?
- gmoh July 02, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon - 2of 2 votes
Answers
- Aalekh Neema July 02, 2017 in IndiaLazy Bartender : There are N number of possible drinks.(n1,n2..) Has C number of fixed customers. Every customer has fixed favourite set of drinks. Bartender has to create least possible number of drinks to suffice need of all the customers Example: Cust1: n3,n7,n5,n2,n9 Cust2: n5 Cust3: n2,n3 Cust4: n4 Cust5: n3,n4,n3,n5,n7,n4 Output: 3(n3,n4,n5)
| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersGiven transactions between group of friends. How to minimize the number of transactions by eliminating redundant cash flow paths?
- imrohitkhatri June 29, 2017 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersWrite second most repeating word in a string
- hello world June 28, 2017 in United States
eg aaa bbb ccc aaa bbb aaa
answer - bbb| Report Duplicate | Flag | PURGE
Amazon SDET - 0of 0 votes
AnswerDesign a suggestions list [system design] for words starting with prefix that user has typed on kindle device . The search is based on most frequent item occurring at the top to least frequent item at the bottom. Most frequent item depends on the usage of word globally.
- disaster007 June 27, 2017 in United States for Prime
For e.g user types "dra" . There should be a list of suggestions starting with dra such as dragon, drape, dracula etc based on their frequency of usage.| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersDesign a image slide show 1) put image method 2) get image 3) random method. Random method should return a list of images such that images should be in randomized order and no image should be displayed twice without exhausting all images at once. I used list to store images . I used random class to generate randomly generated images based on the interval {0,list.size()}. But he insist on using randomization without depending on the list size.
- disaster007 June 27, 2017 in United States for Prime| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswerGiven a set of points in a plane, determine the position/angle where a yacht of 30 degree angle could be placed such that it could cover maximum points
- disaster007 June 27, 2017 in United States for Prime| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
Answersdesign an employee swap in swap out system.
- ashishsaraswat.iips June 26, 2017 in India
The system will have a machine which records the swap in and swap out.
The user can also login in a portal where he can check his swap in /swap out time. He can correct his time also.
There will be managers for employee who can check the entry for all the employees which are under them and correct their subordinates timings also
There will be HR who can only view the entries for all the employees.
We have to come up with the HLD and LLD for the system| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 1of 1 vote
AnswersDesign an algorithm that provided your current location and a list of ATMs locations in the area, get you the closest K ATMs to your location.
- ahmedthehack June 23, 2017 in UK for Amazon Video
Assume you have a method getDistance(a, b) that calculates the distance between a and b.
Follow Up:
Make your solution O(k) space and O(n) time| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersDesign an algorithm to find the shortest substring in a synopsis such that it contains all the words in a provided list.
- ahmedthehack June 23, 2017 in UK for Amazon Video
So, search for the shortest substring that contains ['Hello', 'World'].| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersDesign a system for a parking lot where drivers can also have memberships (but also support guest drivers). The parking lot has counter screens on each row.
- ahmedthehack June 23, 2017 in UK for Amazon Video| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersDesign a message board system like Reddit were users can reply with messages on posted topics. How will you handle system scalability.
- ahmedthehack June 23, 2017 in UK for Amazon Video| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 0of 0 votes
AnswersShell command, there is a log file, you want all the "error" inside the line to find out into another file inside,
- ajay.raj June 11, 2017 in United States
What instruction,| Report Duplicate | Flag | PURGE
Amazon SDE1 - -1of 1 vote
AnswersEnhancements to schema by adding another table lot
- krish June 09, 2017 in United States
SELECT *
FROM Amazon_lot p,
amazon_vehicles v
WHERE p.lotid= 1
AND p.lotid = v.lotid
AND v.vehicleid = 1;
-- was struck for a moment, Interviewer helped me with hint
SELECT count(1)
FROM amazon_residents r,
Amazon_lot l,
amazon_vehicles v
WHERE r.residentid = l.residentid
AND l.lotid = v.lotid
AND r.residentid = v.residentid
AND (v.vehicleid = 1
OR v.lotid = 2);| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersSQL Questions & Answers ,and followup questions
- krish June 09, 2017 in United States
given schema
Tables:
Residents:
resident_ID (num)
Apartment Number
Name
...etc
Vehicles:
vehicle_ID (num)
(FK): Resident_ID (num)
License Plate
Vehicle Size ("small", "large", "motorcycle"...)
Get all the residents who has vehicle size large
SELECT *
FROM amazon_residents res
WHERE EXISTS
( SELECT 1
FROM amazon_vehicles veh
WHERE veh.residentid = res.residentid
AND veh.type = 'large' );| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersGiven items as Shirt, Trouser, Shoes, Tie, Belt, Shocks, and dependencies as -
- codechamp June 06, 2017 in India
Tie can be worn after Shirt
Belt can be worn after Shirt and Trouser
Shocks can be worn after Trouser
Shoes can be worn after Shocks
Find various orders in which the activity of wearing clothes can be completed.| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersGiven a very large file of 10GB containing product price . Sort the file of product if memory available is 1 GB
- ashishsaraswat.iips June 06, 2017 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - -1of 1 vote
AnswersGiven a stream of objects, O1, O2, O1, O3, O4... Provide an algorithm to identify the first unique object at any given point in time.
- abhi10901 May 31, 2017 in United States for AWS Auto Scaling
So for example, in the above, after receiving the first Object, it is unique. After receiving the second, the first is still the first unique object. After receiving the 3rd, the 1st object is no longer unique (you've not seen O1 twice), so O2 is not the first unique object. etc...| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
Answershow to implement a Wish List like this one
- ajay.raj May 30, 2017 in United States
https://www.amazon.com/hz/wishlist/intro| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersFind the first non repeating character in a string. For example if the input string "abcdeabc", non repeating character is "e"
- kag May 24, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - -1of 1 vote
AnswersFind if a mathematical string is balanced in terms of parenthesis. For example "(1+2)" is balanced and "(1+2" is not balanced.
- kag May 24, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersImplement power function. The function should take two numbers as input (e.g. 2,3) and return 8 as output
- Syed May 22, 2017 in India
See link below for hints and answer https://baquerrizvinotes.blogspot.in/2017/05/how-to-crack-amazoncom-technical.html| Report Duplicate | Flag | PURGE
Amazon Software Engineer Coding - 0of 0 votes
AnswerThere is 3D space, limited with a cube, with edge=2000.
- John.Ackerman.jb May 17, 2017 in United States
The center of coordinate system is point (0; 0; 0), so the maximum/minimal coordinate value is 1000/-1000.
There are 10000 points generated with discrete uniform distribution inside of K spheres, located in the cube.
Radius (R) of each sphere is 250.
Centers of spheres are located at the distance of not less than 2*R.
It is required to determine which point related to which sphere.
Input: array of 10000 structures, like:
struct Point {
int number;
int x;
int y;
int z;
}
where number is unique id of the point, x,y,z - it's coordinates.
Output:
array of 10000 structures, like:
struct Point {
int number;
int cluster_id;
}
where cluster_id is unique cluster id of a sphere that point belongs to.
Initially I considered a following solution:
1) Find Euclidian distance for each point from center of coordinates (0;0;0) to point's coordinates.
2) Sort this array of distances in descending order.
3) Get the point from the sorted array of distances and put in a new Set of Cluster Maximals.
4) Compare following point from the array to each value from the Set of Cluster Maximals (initially 1 value).
If it's Euclidian distance less than or equal to 2*R, then
mark this point as belonging to Kth cluster (range=1..N), otherwise add the point to the Set of Cluster Maximals.
5) Repeat step 4.
Two concerns I have:
1) There is an issue that my algorithm would work only in case if Claster Maximals are located on the surface of the spheres.
2) Plus, according to the task requirements, there could be the case when 2 spheres can have 1 and only common point.
I think in case if point belongs to 2 spheres, it is ok to mark it with cluster_id of any of these 2 shperes.
Could you please provide a proper solution to the task?| Report Duplicate | Flag | PURGE
Amazon Backend Developer - 0of 0 votes
AnswersThere are three row of houses. There are N houses in each row. Each house can be painted with three colors: red, blue and green. The cost of painting each house with a certain color is different. You have to paint all the houses with following constaints
- jmincoder2 May 16, 2017 in United States
No two adjacent houses in a row have the same color.
Houses in a column have three different colors
You have to paint the houses with minimum cost. How would you do it?
Note: The cost of painting house 1 red is different from that of painting house 2 red in any row. Each combination of house and color has its own cost.| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - 0of 0 votes
AnswersQuestion 2: Write code for the following: given a text file containing this information (Date the customer logged-in, Tab, Customer ID) Example: 04/11/2017 \t 0003 04/12/2017 \t 0003 04/13/2017 \t 0004 04/13/2017 \t 0003 04/13/2017 \t 0003 04/15/2017 \t 0004
- mhannsari May 13, 2017 in United States
How to get the list of those customers that log in on four consecutive days?
Please give good solution| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersQuestion 1: Given input file with the following set of strings, Download input file: https://www.google.com/basepages/producttype/taxonomy.en-US.txt
- mhannsari May 13, 2017 in United States
Example: Electronics Electronics > Arcade Equipment Electronics > Arcade Equipment > Basketball Arcade Games Electronics > Arcade Equipment > Pinball Machine Accessories Electronics > Arcade Equipment > Pinball Machines Electronics > Arcade Equipment > Skee-Ball Machines Electronics > Arcade Equipment > Video Game Arcade Cabinet Accessories Electronics > Arcade Equipment > Video Game Arcade Cabinets Electronics > Audio Electronics > Audio > Audio Accessories Electronics > Audio > Audio Accessories > Audio & Video Receiver Accessories Electronics > Audio > Audio Accessories > Headphone & Headset Accessories Electronics > Audio > Audio Accessories > Headphone & Headset Accessories > Headphone Cushions & Tips Electronics > Audio > Audio Accessories > Karaoke System Accessories
write a function that stores this information. Your data structure should be able to provide information as Electronics = 14 Electronics > Arcade Equipment = 7 Electronics > Arcade Equipment > Video Game Arcade Cabinets = 1 Electronics > Arcade Equipment > Skee-Ball Machines = 1| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersFind the label with max width of a tree.
- Md Omar Faroque May 12, 2017 in United States for Amazon Business
// 0 A
// /|\
// 1 B C D
// /| | \
// 2 E F G H
Answer is 2 here.| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer