Amazon Interview Questions
- -8of 10 votes
Answers/**
- sunil.sebastian September 01, 2015 in United States
You have list,which contains a DS(Data Structure) which have a list and a value (basically a list of list).
You need to write an iterator such that it will iterate over the numbers/integers whenever a .next() is called
1->2->3->4
|
6---->7------------->10
| |
8->9 11->12
Output
1 .next() -> 1
2..next() -> 6
3..next() ->7
4..next() ->8
5..next() ->9
6..next() ->10
7..next() ->11
8..next() ->12
9..next() ->2
10..next() ->3
11..next() ->4
12..next() -> throws Exception
**/| Report Duplicate | Flag | PURGE
Amazon SDE-2 Linked Lists - 1of 1 vote
AnswersBST is given.
- AndreasVolcenstein August 29, 2015 in United States
Calculate and return array with a sum of every level.
For example,
1
2 3
4 5 1 2
Output should be [1, 5, 12].| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersCompany will start a new marketing campaign targeting the users according
- JavaBuddy August 22, 2015 in United States
to their purchasing profiles.
This campaign has 3 kinds of messages each one targeting one group of customers:
Message 1 - targets the 25% of customers that spend most at the site
Message 2 - targets the 25% of customers that spend least at the site
Message 3 - targets the rest of the customers.
Given the list of purchases made during the week, write a program that lists
what kind of message each customer will receive.
Each purchase in this list features the customer id, the purchase amount among other information.| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm Java - 2of 4 votes
AnswersA string contains a-z, A-Z and spaces. Sort the string so that all lower cases are at the beginning, spaces in the middle and upper cases at the end. Original order among lower and upper cases needs to remain the same. For example: a cBd LkmY becomes ackm BLY. Is there a way in O(n) without extra space?
- chad August 13, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm Arrays - 4of 4 votes
AnswersThis is one of the interview questions during the Amazon SDE interview. Request your help in providing the solution.
- satish1987 August 12, 2015 in United States
Question - We are interested in building a special type of sequence. for a given number N, we want to arrange the numbers {1,1,2,2,3,3,... N,N} such that they have the following property.
For each number / in (1,N) there should be exactly / numbers between the first appearance of the number and the second appearance. Below example would clarify further.
Input:
A Single number N for which we want to produce the sequence.
Output:
A space separated list of sequence or NA if there is no possible sequence.
Example Input:
3
Example Output:
2 3 1 2 1 3
Explanation : There is 1 number between 1s(2). There are 2 numbers between the 2's(3 1 ). There are 3 numbers between the 3's(1 2 1 ).| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 1of 1 vote
AnswerHow would you design a price tracking website like camelcamelcamel.com?
- jb August 07, 2015 in United States
For example, we might want the following behavior. Input: Item URL and target price. Result: if the item goes below the target price, then users tracking the item will get an email alert.
Consider the following topics in the answer: database design (SQL or NoSQL), automated price checking mechanism, price scraping or price API, caching data.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersThere are n persons and k different type of dishes. Each person has some preference for each dish. Either he likes it or not. We need to feed all people. Every person should get atleast one dish of his chioce. What is the minimum number of different type of dishes we can order?
- prashant2006ster July 28, 2015 in India
Input is n x k matrix boolean matrix.For each person a row represent his likes or not likes each row.
n = 6 k = 7
1 0 0 0 1 0 0
1 0 0 0 0 1 0
1 0 0 0 0 0 1
0 1 0 0 1 0 0
0 0 1 0 0 1 0
0 0 0 1 0 0 1
Output
3
Explanation
Take dish number 5,6,7.| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 2of 2 votes
AnswersModel a restaurant reservation system, where staff can a reservation, pull up, cancel reservations. The reservation system is very simple local to just one terminal at the restaurant not connected to network.
- soumi July 27, 2015 in United States for Echo| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer Object Oriented Design - 1of 1 vote
AnswersFind an algorithm to find a word ladder between 2 words by changing just one letter at a time. All the words formed should be valid dictionary words.
- soumi July 27, 2015 in United States for Echo
Eg.
FOOL ->POOL->POLL->POLE->PALE->SALE->SAGE
COLD → CORD → CARD → WARD → WARM| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersWrite test data to check the e-mail id field
- APV July 25, 2015 in India for Amazon Wireless
e.g:- abc@xmail.com| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersEnumerate test cases for testing an online payment using credit card for a purchase done through mobile app.Test cases should have description and expected result
- APV July 25, 2015 in India for Amazon Wireless| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswerHow would you debug the following case
- APV July 25, 2015 in India for Amazon Wireless
Your phone gets switched off every time you click on the alarm icon| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 2of 2 votes
AnswersWrite program for the following case
- APV July 25, 2015 in India for Amazon Wireless
Reverse string (string is stored in an array)
Input:- "This is an example"
Output:-sihT si na elpmaxe| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer String Manipulation - 1of 1 vote
AnswersWrite program for the following scenario
- APV July 25, 2015 in India for Amazon Wireless
Input Array :- {1,2,3,4,5,5,5,6,7,7}
Output:- 5 is repeated 3 times
7 is repeated 2 times| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Arrays - 0of 0 votes
AnswersWrite code for square root function? Basic Math Square Root. (Discuss your solution first with the interviewer then code while interviewer was watching over online)
- robotics1 July 25, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersThis interview was held 3 years back. adding this question for others reference.
- Sach July 20, 2015 in India
Design a picasa.i.e. A photo album application where user can store his pictures and share among the others using their email ids.
You need provide high level design for server and client.
I explained about
- storage on RDBMS database ( Interviewer was expecting some datwarehousing or NOSql over here but I could not explain as was not aware of it till that time)
- Different sizes of photo storage.
- Cache for recently accessed photos
- Cache for most accessed photos
- Regional servers
- Disaster management, clustering, HA| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersA large file is given you have to find all the anagrams ??
- rahulkumar5july July 17, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon - 1of 1 vote
AnswersGiven a Folder path in a Directory Structure. E.g. “temp/reg”; you need to find all the files with extensions “.c” in this folder as well as in the sub-folders.
- rahulkumar5july July 17, 2015 in United States
Source:
http://www.geeksforgeeks.org/amazon-interview-experience-194-for-software-support-engineer/| Report Duplicate | Flag | PURGE
Amazon - 3of 3 votes
AnswersGiven a matrix containing 0 and 1. Consider 1 as 'Land' and 0 as 'Water'. Find out the number of 'Islands' in the matrix. That is, set of all adjacent 1 will make up for an island.
- prajakta mahamuni July 17, 2015 in India
For example:
[ 0 1 1 0 1 ]
[ 1 1 1 0 0 ]
[ 0 0 0 1 1 ]
[ 1 0 0 1 0 ]
This problem has 4 islands. ( consider set of 1s, vertically, horizontally and diagonally ).| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - 1of 1 vote
AnswersWrite a function which does zig-zag traverse of binary tree and prints out nodes.
- Eugene July 16, 2015 in United States
Example:
1
2 3
4 5 6 7
Output: 1, 2, 3, 7, 6, 5, 4| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 2of 2 votes
AnswersA single-elimination tournament with 64 teams. Before the tournament, fans construct fantasy brackets for their tournament predications. Design a data structure for storing fan brackets and algorithm to score their brackets against a winning bracket. Assume we will then need to quickly score a player’s predictions (1 point per successful round prediction) and your solution should be optimal enough to handle millions of fan brackets with minimal data.
- DVD July 15, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Software Developer Data Structures - 1of 1 vote
AnswersA car rental company which rents car by per hour basis
- Goodprodd July 14, 2015 in United States
wants to know the time period for maximum number cars that are rented. ie you are given the list of rental start time and return times of all rented cars in the day for all cars in a day find the maximum time period in which cars are on the road.| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 0of 0 votes
AnswersWrite a function to print unique rows of a matrix.
- ritwik_pandey July 13, 2015 in India
I am thinking of a 0(n) solution for this (if possible).
I am storing the rows of the matrix in a set of vectors and then printing those rows. Please tell me how to do this and the correct time complexity for that. I am not very good with STL.| Report Duplicate | Flag | PURGE
Amazon Software Engineer Matrix - -2of 2 votes
AnswerYou have two dictionary in python.
- Ilan.Shtrak July 13, 2015
You should compere two dictionary
1. when key same you should compare values
2. when key different you should compare key and value and output should be how much have different keys and values .
Code in python| Report Duplicate | Flag | PURGE
Amazon Jr. Software Engineer - 0of 0 votes
AnswersGiven a dependency list of libraries (where an item is: library X depends on library Y) generate a list describing the order in which libraries should be loaded.
- tested.candidate July 13, 2015 in UK
Additional request: detect circular dependencies.| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer Algorithm - 1of 1 vote
AnswersDesign the (content) search autocomplete feature on Kindle
- tested.candidate July 13, 2015 in UK| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer System Design - 1of 1 vote
AnswerArchitect a world-wide video distribution system
- tested.candidate July 13, 2015 in UK| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design - 0of 0 votes
AnswersDesign Google Search
- tested.candidate July 13, 2015 in UK| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer System Design