Amazon Interview Questions
- 3of 3 votes
AnswersCheck if an integer array is arithmetic sequence.
- PS February 08, 2016 in United States
Example: 1, 2, 3, 4, 5, 6, 7, 8 => true
1, 3, 5, 7, 9 => true
Array may not be sorted.| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - 0of 0 votes
AnswersDesign a chat application. How will u handle huge data?
- Nascent February 07, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersDesign an online pizza delivery system. Complete OO Design needed.
- Nascent February 07, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersGiven a 2D array of digits, try to find the occurrence of a given 2D pattern of digits. For example, consider the following 2D matrix:
- kohansey February 04, 2016 in United States
7283455864
6731158619
8988242643
3839505324
9509505813
3843845384
6473530293
7053106601
0834282956
4607924137
Assume we need to look for the following 2D pattern:
950
384
353| Report Duplicate | Flag | PURGE
Amazon Software Developer Matrix - 2of 2 votes
Answersfind the maximum depth in a binary tree.
- pooja January 31, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern - -2of 2 votes
Answersgiven an integer array , find all combinations which sum to a given number. If a number is used once, it must not be used again.
- pooja January 31, 2016 in United States
eg if input array is 6444 and sum =10
output must be just 6 4
Give an O(n) solution| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern - 0of 0 votes
Answersgiven a string with only paranthesis - find out if it is balanced or not
- pooja January 31, 2016 in United States
eg {}[]()
followup : scale your solution and specify the right data structure to use if you have a lot of such bracket types| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern - 1of 1 vote
Answershow can i merge 2 nodes in a graph in 1 node , need to save the in and out edges and the nodes that was merged for contribution after that
- KabhaD82 January 30, 2016 in United States
for example a graph implementation in adj list:
1->3->4->6
2->3->4->6
5->4->6
and i want to merge the nodes 3 and 4 , then new nodes should be created 7 as :
1->7->6
2->7->6
5->7->6
7->6
the node 7 also will save [include 3,4 the merged nodes]
any one can help with that please
typedef struct AdjListEntry {
int visited;
int index;
struct AdjListNode current; // node iniformation
struct AdjListEntry* next;
} AdjListEntry;
typedef struct AdjListNode {
int Uind;
char name[10];
char label[10];
adjOutEddgeLists *outEddges;
//adjInEddgeLists *inEddges;
} AdjListNode;
typedef struct adjOutEddgeLists{
AdjListNode *listNode;
adjOutEddgeLists *next;
}adjOutEddgeLists;| Report Duplicate | Flag | PURGE
Amazon Software Engineer C - 0of 0 votes
Answersgiven a string, calculate the frequency of characters, output the array with the letter and frequency. (such as: for “abbcdc”, the output should be (a,1),(b,2),(c,2),(d,1))
- eminsqa January 26, 2016 in United States for AmazonMusic| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Quality Assurance Algorithm Java - 0of 0 votes
AnswersYou are at Amazon search-box, please specify, what Test Cases / Test Plans would you write down: Just name them, don't provide steps, consider wider scope not just functionality.
- eminsqa January 26, 2016 in United States for AmazonMusic| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Quality Assurance Testing - 0of 0 votes
AnswersHi.For the online assessment test - Debugging , which programming languages code snippet I can expect?Thank you !
- Priti January 23, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon Software Developer Debugging - 1of 1 vote
AnswersThis is was asked in Amazon SDE online test from Hacker rank.
- sandeepparekh9 January 20, 2016 in Hong Kong
Initech is a company which has CEO Bill and a hierarchy of employees. Employees can have a list of other employees reporting to them, which can themselves have reports, and so on. An employee with at least one report is called a manager.
Please implement the closestCommonManager method to find the closest manager (i.e. farthest from the CEO) to two employees. You may assume that all employees eventually report up to the CEO.
Tree structure:
Bill -> Dom, Samir, Michael
Dom -> Bob, Peter, Porter
Peter -> Milton, Nina
Sample Data:
CEO Bill has 3 employees reporting to him: {Dom, Samir, Michael}
Dom has three reports { Peter, Bob, Porter}
Samir has no reports {}
Michael has no reports {}
Peter has 2 reports {Milton, Nina}
Bob has no reports {}
Porter has no reports {}
Milton has no reports {}
Nina has no reports {}
Sample calls:
closestCommonManager(Milton, Nina) = Peter
closestCommonManager(Nina, Porter) = Dom
closestCommonManager(Nina, Samir) = Bill
closestCommonManager(Peter, Nina) = Peter| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 1of 1 vote
AnswersGiven a list of tuples {x, y, x' } that describe histograms on the X/Y axis, such that X is the X coordinate, Y is the Y coordinate, and X' is the distance from X, write a function that draws the skyline of these tuples.
- william.brandon.lee83 January 18, 2016 in United States
For example:
{3, 2, 4} , {4,5,3} will give the following points:
{3,0} - trivial
{3,2} - trivial
{4,5} -calculated
{7,0} -if list is done.
You cannot assume that the tuples are sorted. Provide runtime analysis.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a list of integers of size n, write a method to write all permutations the list; do this in O(1) space
- william.brandon.lee83 January 18, 2016 in United States
Hint: No recursion.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDescription:
- nasbtv January 15, 2016 in India
A company, create classes for each type of employee and calculate working hours and wages/salaries that will be received.
Example General Manager, IT Manager, Accounting, Marketing, Finance, Procurement Managers
Manager and Higher level employees wont have overtime wage. Overtime wage is 1.5 times higher than the usual wage. Working hours are limited as 8 hours. More than this limit will be considered as overtime.
Inputs:
Employee Name, Surname
Title/Role
Salary
Daily Working hour
Outputs:
Date
Employee Name, Surname
Daily Wage.| Report Duplicate | Flag | PURGE
Amazon SDE-2 C++ - 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 - 0of 0 votes
Answersthere is a chess board of dimension n X n. You are given with 2 squares on that board S(x1,y1) ;M(x2,y2). S is a fixed point. M can move diagonally. it can move any number of steps or jumps in 1 move . Find the minimum number of moves M needs to reach S
- mohapatrasandeep60 January 09, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Coding - 1of 1 vote
Answersthere is a news publishing/subscribing product of Amazon where electronic contents are collected from owners like newspaper, magazines. Customer is using kindle. Design how customer will get the content when his system kindle connects to net. how to send the contents to device?
- mohapatrasandeep60 January 09, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersGiven a number (200), compare it to four variables (E.G A,B,C,D) and return true if they are all equal to the given number.
- J@sper January 09, 2016 in United States
Do this in the most efficient way, and if possible without if statements.| Report Duplicate | Flag | PURGE
Amazon Computer Scientist C - 0of 0 votes
AnswersThis was a design question, discuss data structures/ complexities, etc.
- AnonymousN January 05, 2016 in United States
There is a huge HashMap (Key-Value store). This is present in storage, dont worry about the Storage.
1. Build its index. Distributed system for indexing. Different cases: Key is a String/ Double/ complex structure, etc. How will you replicate this index structure - whole index is replicated/ parts of index are replicated.
2. How will you synchronize access (read/ write) if there are multiple replicas of the index partition. What if the actual Storage partition also has replicas.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Distributed Computing - 0of 0 votes
Answersi need to write code that union two nodes from graph G Vi ,Vj
- KabhaD82 December 30, 2015 in Isreal
then new node will generated Vm = ViUVj| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C - 7of 7 votes
AnswersFind missing element in the A.P.
- poojaarora014 December 22, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDET Algorithm - 0of 0 votes
AnswersImplement the power function with o(logN) time complexity and O(1) space
- poojaarora014 December 22, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDET Algorithm - 1of 1 vote
Answerscreate palindrome in javascript, by appending a minimum set of characters at the end.. eg. test => testset
- codebind December 19, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 1of 1 vote
AnswersGiven a log file:
- AnonymousN December 15, 2015 in United States
some garbage...from:123.54,78.21...more garbage..to:56,82,124.54...more
some more garbage...from:11.54,45.84...garbage..to:115.87,98.65
...
Write a program or shell script to return pairs of (from, to) coordinates.
Assumption: these coordinates will always appear in sequence: from ... to... from ... to...
But these from - to pair may or may not be on same line.| Report Duplicate | Flag | PURGE
Amazon SDE-2 shell scripting - 0of 2 votes
AnswersGiven an array, find the first element that appears an even number of times.
- techinterviewsintesys December 14, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Applications Developer - 1of 1 vote
AnswersGiven a circular linked list. Find the longest sequence of numbers, where a sequence starts with any number, for example 3, and ends when you see that number again,another 3.
- techinterviewsintesys December 14, 2015 in United States
Imagine the circular linked list
3 8 9 7 2 1 3 4 6 [3] same as first element .i.e three.
The longest sequence would be 3 8 9 7 2 1 , the other candidate being 3 4 6
Finding for instance,starting at 8 and getting to the same 8 wouldn't count as a valid sequence.| Report Duplicate | Flag | PURGE
Amazon Applications Developer - 1of 1 vote
AnswersGiven a 8 by 8 matrix, find all possible paths , moving one cell downwards or on cell to the right,(one cell per movement ) from cell 0,0 , to cell 7,7
- techinterviewsintesys December 14, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Applications Developer - 1of 1 vote
AnswersFind the first non-repeated element in an unsorted array.
- techinterviewsintesys December 14, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Applications Developer - 0of 0 votes
AnswersGiven a squared matrix, shift all elements 1 place to the right in circular fashion.
- techinterviewsintesys December 14, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Applications Developer