Amazon Interview Questions
- 2of 2 votes
AnswersCreate a data structure that has fast insertion, removal, membership testing, and random selection.
- / February 21, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 2of 2 votes
AnswersGive m balls and n bins. Find out how many ways to assign balls to bins. Notice the buckets has no order. Like (1,2,3) and (3,2,1) are considered the same.
- aonecoding June 24, 2018 in United States
eg, m = 3, n = 2, return 2. (1, 2) and (3, 0)| Report Duplicate | Flag | PURGE
Amazon Software Developer - 2of 2 votes
AnswersDesign a logging system. The system contains multiple application servers which are logging the information to file system. In this scenario, we want to check and alarm in case an exception is thrown in any of the servers. We want a system that checks for appearance of specific words, "Error", "Exception", "Disk Full" etc. in the logs of any of the servers. How would you design this system?
- jay September 17, 2016 in India
What if we want to scale the system in future?| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 2of 2 votes
AnswersFind the minimum (index) distance sum of 3 words. For example: arr = {"2", "1", "0", "2", "0", "3", "0"}, input = "1","2","3". The result should be 8 since the 2nd "2" and "1", "3"'s distance are 3, 1, 5 and abs(3,1)+abs(3,5)+abs(5,1)=8.
- lifeGoGoGo April 01, 2016 in United States
Implement this in O(N)| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 2of 2 votes
AnswersGiven an array of integers find the element for which the sum of left = sum of right. example -1 100 1 98 1 should return index of 1 i.e 2
Answer: First told him about Brute Force approach and then told him if we can iterate once and get the total sum
- Mumbaiya_Chori January 19, 2015 in India for Machine learningint findIndex(A){ int sum =0; for(int i =0;i<A.lenght;i++) { sum+= A[i]; } int lSum=0; for(int i=0;i<A.length;i++) { int rsum = sum - lsum-A[i]; if(lsum==rsum) return i; lsum += A[i]; } return -1; }
| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 2of 2 votes
AnswersHow would you implement virtual functions in C
- iwanna September 24, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C# - 2of 2 votes
AnswersHow would you maintain concurrency on a shared page being edited by multiple users simultaneously.
- chaos April 03, 2014 in United States
What if the page is being shared using a client- server mechanism. Represent the classes and explain the thread safety mechnism to avoid editing conflicts.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Threads - 2of 2 votes
AnswersGiven a binary tree, find the closest LEAF node to the target.
- aonecoding August 24, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 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 - 2of 2 votes
AnswersDesign a Meeting Reminder Pop-up similar to one found on outlook.
- R@M3$H.N August 29, 2014 in India
Data Structure to be used and come up with classes.| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 2of 2 votes
AnswersDesign Elevator system. And then write an algorithm for that Design such that, the user request should be completed in logN time in a N story building with M elevators,
- fbrubacher June 16, 2013 in United States for Search| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 2of 2 votes
AnswersDesign a parking lot with a condition that park() and unpark() should happen in constant time. Discuss the objects created and how the above functionality is achieved in constant time.
- AnonymousUser March 28, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - 2of 2 votes
AnswersGive m balls and n bins. Find out how many ways to assign balls to bins. Notice the buckets has no order. Like (1,2,3) and (3,2,1) are considered the same.
- acoding167 May 16, 2019 in United States
eg, m = 3, n = 2, return 2. (1, 2) and (3, 0)| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 2of 2 votes
AnswersAWS phone interview
- aonecoding May 13, 2018 in United States
Find the left view of binary tree
1
/ \
2 3
/\ \
4 5 6
/ /
7 8
/
9
return [1, 2, 4, 7, 9]| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 2of 2 votes
AnswersPhone Interview Amazon, Seattle
- aonecoding July 28, 2017 in United States
I. Get the sum of all prime numbers up to N. primeSum(N).
Follow-up: If primeSum(N) is frequently called, how to optimize it.
II. OODesign Parking Lot| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 2of 2 votes
AnswersAsked like 8 different behavioral questions that were supposed to exemplify Amazon values. I was unprepared for this, as many people say Amazon doesn't do this.
- steez June 22, 2015 in United States for android amazon app, social shopping
For example, I was asked "Tell me about a time when you solved a complex problem with a simple solution", "Tell me about a time when you increased efficiency", "Tell me about a time when you made a judgement call to take an unknown risk", "Tell me about a time when you disagreed with your team about something and how you reconciled it"| Report Duplicate | Flag | PURGE
Amazon SDE-2 General Questions and Comments - 2of 2 votes
AnswersHow does traceroute work?
- Xerox March 03, 2014 in United States for AWS| Report Duplicate | Flag | PURGE
Amazon Technical Support Engineer Networking / Web / Internet - 2of 2 votes
AnswerDesign a movie ticket booking system like bookmyshow.com
- neer.1304 March 29, 2017 in United States
Follow-up question -
1) How do you handle issues like scalability, concurrency, fault-tolerance etc.
2) Show movie theaters near to user where movie is playing and seats are available
3) Design database. What kind of DB would you use SQL or No-SQL
4) In real time how would you show which seats are booked which are free
5) If theaters do not have any api for fetching information then what can we do about it.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 2of 2 votes
AnswerHow do we achieve (google news) personalization.
- sati November 05, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 2of 2 votes
AnswerDifference between ping and traceroute?
- Xerox March 03, 2014 in United States for AWS| Report Duplicate | Flag | PURGE
Amazon Technical Support Engineer Networking / Web / Internet - 2of 2 votes
AnswerThreads synchronization methods, how do they use CPU time slice and compare their efficiency?
- lianshiwu January 08, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Threads - 2of 2 votes
AnswersDesign a Netflix type system. Start from HLD to LLD.
- neer.1304 August 31, 2017 in United States
Consider requirements like search, video serving, authentication, security, serving multi quality video.| Report Duplicate | Flag | PURGE
Amazon SDE-3 design - 2of 2 votes
Answers10000 cameras, 100 hours of video each. 30 fps. Police need to input a plate number and find the path of a suspicious vehicle. (Estimate the size of the video, e.g., blueray disc is 2 hours and 20 GB. No need to scan all of the videos. Estimate the time that a vehicle can be seen between 2 traffic cameras, e.g., 0.3 miles and 30 miles per hour, then select 1 out of 100). Web client, load balancer, servers, db.
- kwangrand July 31, 2016 in United States for Kindle| Report Duplicate | Flag | PURGE
Amazon SDE1 System Design - 2of 2 votes
AnswersI have a photo storage service. The actual photos are present in some storage and the index of these photos is present at some other place. The index is huge, say trillions of photos. Design the class for index node of each photo (with attributes like name*, date*, size*, accesscontrol, camera details, shot details, etc) such that 1. It is serializable. 2. For faster processing, I am interested in first 3 attributes. When deserializing the bytes of object, parse these 3 attributes i.e. instead of deserializing whole class, deserialize only part of the class (members marked by*), other members of class should be deserialized on demand with another call.
- AnonymousN January 10, 2016 in United States
How will you test the performance of your serialization/ deserialization?| Report Duplicate | Flag | PURGE
Amazon SDE-2 Java - 2of 0 votes
AnswersSimulate a seven-sided die using only five-sided
- vodangkhoa March 23, 2008| Report Duplicate | Flag | PURGE
Amazon Microsoft Software Engineer / Developer Algorithm - 2of 0 votes
AnswersGiven an n*n matrix A. Each row of the matrix and each column of the matrix is sorted.
- Kevin October 14, 2008
Given a number S, you are required to find S in the matrix( report k, l such that A[k,l] = S) or conclude S is not in A.
How can you solve it in O(n)?| Report Duplicate | Flag | PURGE
Amazon Development Support Engineer Software Engineer / Developer Algorithm - 2of 0 votes
AnswersIf there are two structs, TreeNode and Tree. TreeNode contains 3 elements, data, lChild and rChile. Tree contains 2 elements, int size and TreeNode *root. The tree is a complete tree. So how to find a O(logN) approach to insert a new node.
- Little Bread June 08, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Trees and Graphs Algorithm