Amazon Interview Questions
- 0of 0 votes
AnswersYou have given an array of integers. The appearance of integers vary (ie some integers appears twice or once or more than once) How would you determine which integers appeared odd number of times ?
- gekko May 06, 2016 in United States
a[] = { 1.1.1, 2,5,10000, 5,7,4,8}
as you can see 1 appeared 3 times, 2 appeared once etc| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersFinding Peak element in an array
- sivarasu.net May 03, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 - -1of 3 votes
AnswersConstruct a Binary tree from the preorder traversal and find the distance between two nodes.
- EsmailDini April 28, 2016 in canada for Alexa| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Data Structures - 0of 0 votes
AnswersYou are given a graph and a node in the graph. Group the nodes connected to this node if they are also connected to each other. For example, the graph has nodes 1, 2, 3, 4, 5 where 1 is connected to 2, 3, 4; 2 and 3 are also connected to each other, 4 is just connected to 1 and 5 is a separate node. You are given node 1 as input. Output should be:
- doomguy April 05, 2016 in United States
2 3
4| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersThere was a bug caught in production.why it wasn't caught in the qa.what was the reason?
- Ajay April 05, 2016 in India for amazon.in| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
Answersyoutube video(audio is audible and rest all r working fine) doesn't show up only in firefox browser.how would you debug this issue
- Ajay April 05, 2016 in India for amazon.in| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 2 votes
AnswersThere are 2 arrays of integers.You have to add the those integers and keep it in 3rd array.there is one condition, if the sum is a 2 digit number, split that number into single digiit and other condition is if any of the array integer is left then print that number
- Ajay April 05, 2016 in India for amazon.in
I/P:
int[] a = {1,2,3,4,5,6}
int[] b = {2,3,4,5,6,7,8}
o/p:
{3,5,7,9,1,1,1,3,8}| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Arrays - 0of 0 votes
AnswersImplement a test Automation framework for the gmail login page.
- Ajay April 05, 2016 in India for amazon.in| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Automata - 0of 0 votes
AnswersWrite down testcases for an app which uploads files(text or pdf etc) from local machine or a dropbox.
- Ajay April 05, 2016 in India for amazon.in
Also cover testcases for the narration of that file| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 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 - 0of 0 votes
AnswersIf I am designing a media player and I want to store songs and play them in random order
- ash.taunk3 March 17, 2016 in India
a) what data structure will you use to store songs?
b) how will select the next song to play in a way which prevents the same song being played in consecutive turn| Report Duplicate | Flag | PURGE
Amazon Data Structures - 1of 1 vote
AnswersGiven a number print the number of combinations you can derive from the number. 1=A, 2=B, 26=Z, 0=+.
- SHR March 14, 2016 in India
For example: 1123 can be represented by 1,1,2,3 which would stand for AABC.
Another representation - 11,23 - JW
Another representation - 1,1,23 - AAW
Another representation - 11,2,3 - JBC
For number 1123, there will be 5 combinations.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersIn a binary tree, find and print the path with smallest weight.
- SHR March 14, 2016 in India
Criteria: the tree contains integer values in the nodes. It may not be balanced tree. Weight is calculated by sum of values in the nodes in that path. Write code that returns the path as well as the minweight.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven a series of number form a binary tree find the minimum weight binary tree. The weight of the node is depth * value of the element + weight of the left tree + weight of the right tree.
- neer.1304 March 11, 2016 in United States
Weight of the root node is the weight of the tree . Find the minimum weight binary tree out of all possible binary trees that are possible.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersDesign an Algorithm for Amazon Advertisement Page
- suneel March 10, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 1of 1 vote
AnswersGiven a million list of co-ordinates in the form of longitude and latitude just as Google maps .How will you print closest k cities to a given location .
- neer.1304 March 06, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswerGiven start time and end time of parking (below is the table of price rule). Come up with data structure you can store these price rules
- neer.1304 March 06, 2016 in United States
Price Rules:
On Weekday On Weekend
Hours Price Hours Price
0 – 2 $5 0 – 2 $8
2 – 6 $10 2 – 6 $13
6 – 12 $15 6 – 12 $18
12 – 24 $20 12 – 24 $25
Design an architecture for the system which shows parking spaces available near customer's location in a mobile app.| Report Duplicate | Flag | PURGE
Amazon SDE-3 Software Design - 0of 0 votes
AnswersThis was the 2nd round. Face to face. DS and Algo
- uday4friendz March 04, 2016 in India for Product Details Page
Q1) Given an array 'A' of size 'n' and a number 'm' such that 'm <= n'. For all subsets of 'A' of size 'm', return the difference between the number of non-increasing and non-decreasing sub-sequences.
He asked me to write the program on paper in any language.
This is how i approached it.
1) First i gave the brute force solution and explained it to him. He liked it.
2) Then he asked for the complexity of the solution. I gave right ans.
3) Then i told him that it can be optimized by 'xyz' approach.
4) Then he asked me if i can write the solution. I said i will first explain him how it can be solved. Then if he wants me to write the code, he will have to leave me alone for some time. He agreed. I explained.
5) There was a bug in my solution. He gave a test case that exposed it. Then i rectified the bug. He accepted.
6) He said that it. He does not need the full code.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersThis was the first round. A written test. I was asked to write a complete program that can execute with proper syntax. Also comment on the complexity and add comments to code where necessary. And i had to write it on Paper. Three questions were given and was asked to answer any two. I was given 1hr time for this.
- uday4friendz March 04, 2016 in India for Product Details Page
This was one of the questions
Q) You are given a BST and a number k. Find the node in the tree which has the value closest to k.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Programming Skills - 0of 0 votes
AnswersThis was the first round. A written test. I was asked to write a complete program that can execute with proper syntax. Also comment on the complexity and add comments to code where necessary. And i had to write it on Paper. Three questions were given and was asked to answer any two. I was given 1hr time for this.
- uday4friendz March 04, 2016 in India for Product Details Page
This was one of the questions.
Q) You are given a linked list and two integer nums 'm' and 'n'. Retain 'm' elements and delete 'n' elements. Do this repeatedly till the end of the linked list.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Programming Skills - 0of 2 votes
AnswersGiven N ropes of lengths L1, L2, L3, L4, …, LN. I had to join every rope to get a final rope of length L1 + L2 + … + LN.
- ash.taunk3 February 24, 2016 in India
However, I can join only two ropes at a time and the cost of joining the two ropes is L1 + L2. I was supposed to join ropes in such a way that the cost is minimum.| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 2of 2 votes
Answers|X XX | | X X | | X | | |
X = land.
- HumbleLearner February 20, 2016 in United States
Empty space = Water.
Find the number of islands present. (Upto you how you want to represent land and water in the array above)
Answer for the above example: 3
I wish I could draw the diagram better!
Explanation: 3 because:
The three islands are:
X
X
X
XX
X| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 0of 0 votes
AnswersBinary search inorder traversal asked by Amazon
- Info.Dubey February 20, 2016 in India
struct Node
{
int data;
Node *right.*left,*random
}
Tree should be in-order traversal and random node should keep the in-order transversal path.| Report Duplicate | Flag | PURGE
Amazon Software Developer Data Structures - 0of 0 votes
AnswersAmazon interviewer has told to made a program which print number increment or decrement fashion depend on the user input.
- Info.Dubey February 20, 2016 in India
suppose if user enter "ID" where "I" stands for increment number and "D" stands for decremental number and produced output should be 231. they have given three condition first condition Number should be belongs from 1 to 9.
second condition number should not be duplicate
third number should be least number.
example:
User input "ID"
Number should be 231
if User Input "IDDI"
then output should be 45312
if user input "IID" then output should be 2341| Report Duplicate | Flag | PURGE
Amazon Software Developer - 1of 1 vote
AnswersGiven an array of 0s and 1s, and k, Find the longest continuous streak of 1s after flipping k 0s to 1s.
- neer.1304 February 14, 2016 in United States
E.x array is {1,1,0,0,1,1,1,0,1,1}
k = 1 (which means we can flip ‘k’ one 0 to 1)
Answer: 6 (if we flip 0 at index 7, we get the longest continuous streak of 1s having length 6)| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersToday is school picture day and everybody,
- ritikashah017 February 11, 2016 in United States
including the teacher, has lined up in a single line for the class picture.
Design an O(n log n) Java code that computes the minimum number of swaps necessary to be in order| Report Duplicate | Flag | PURGE
Amazon Intern Java - -5of 5 votes
AnswersGiven is a large paper with n different points with coordinates (x1, y1),(x2, y2), . . . ,(xn, yn).
- ritikashah017 February 11, 2016 in United States
Keep folding at 45 degres| Report Duplicate | Flag | PURGE
Amazon Intern Java