Amazon Interview Questions
- 1of 1 vote
Answers/*
- kumar March 03, 2017 in United States for Advertisement
* Please come up with Class and Data Structure Design for a "metric" system to determine the top song of a
* band. Two Web Service calls
*
* void play(String bandname, String songname);
* String topSong(String bandname);
*/
// play("Lady Gaga", "Pokerface");
// play("Lady Gaga", "Pokerface");
// play("Lady Gaga", "Alejandro");
// play("Bruno Mars", "Treasure");
// topSong("Lady Gaga") -> "Pokerface"| Report Duplicate | Flag | PURGE
Amazon SDET - 0of 0 votes
Answercount Number of balanced Binary Tree given Preorder Sequence length
- ajay.raj March 02, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersGiven a diamond shape matrix, find the minimum path sum from top to bottom.
Each step you may move to adjacent numbers on the row below.
- ajay.raj March 02, 2017 in United States[ [2], [3,4], [6,5,7], [4,1,8,3], [2,5,4], [6,4], [1] ]
| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersDesign a kind of kindle fire application where we can subscribe news channel and read the news from all publishers as a digital format.
- Mihir.bhatt11 February 28, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 0of 0 votes
AnswersGiven 3 sorted arrays. Find(x,y,z), (where x is from 1st array, y is from 2nd array, and z is from 3rd array), such that x<y<z.
x = element(s) from array 1
y= element(s) from array 2
z = element(s) from array 3
I can have more than 1 elements from each array. But at least 1 from each array is mandatory and elements from .int[] arr1 = {3}; int[] arr2 = {11, 13, 16}; int[] arr3 = {45}; Correct Output : 7 (3,11,45) (3,13,45) (3,13,16,45) (3,16,45) (3,11,13,45) (3,11,16,45) (3,11,13,16,45)
Need to find the number of such sequences.
- manishasharma361 February 26, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer Algorithm - 0of 0 votes
AnswersYou are given a String S of length N. Now, a good subsequence is one that can be represented in the form (a raised to the power i) (b raised to the power j) (c raised to the power k) where i≥1, j≥1 and k≥1. For example ,if i=2, j=1, k=3, it represents the string aabccc. In short, a good subsequence is a subsequence that first consist of
- itsvks February 24, 2017 in United States
i ′a′ characters, followed by j ′b′ characters, followed by k′c′ characters, where i≥1, j≥1 and k≥1
Now, you need to find the number of good subsequences of String S. As the number of such subsequences could be rather large, print the answer Modulo
(10 raised to the power 9) + 7.
Note: Two subsequences are considered different if the set of array indexes picked for the 2 subsequences are different.
Input : abcabc
Output : 7
Explanation
Valid sub sequences are(1-based indexing):
{1,2,3}
{1,2,6}
{1,5,6}
{4,5,6}
{1,2,5,6}
{1,4,5,6}
{1,2,3,6}| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersIf a string is matched to any filter, it is in the black list, otherwise not.
- ajay.raj February 23, 2017 in United States
Design a data structure and implement following two functions.
addFilter(filter)
isInBlackList(string)
filters are in the form of
“a*b”
“abc”
“aa*b”
having at most one star, which matches 0 or more chars.| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 0of 0 votes
AnswersDesign a system that will let multiple sellers upload their products to Amazon seller's programs
- rasimu February 23, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Software Development Manager - 0of 0 votes
AnswerTell me about a time you pushed your developer to take a risk
- rasimu February 23, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Software Development Manager - 0of 0 votes
AnswerDesign the architecture for advertisement platform where N number of advertiser can display their ad on M number of websites.
- avi.jasu01 February 22, 2017 in India| Report Duplicate | Flag | PURGE
Amazon Program Manager System Design - 0of 0 votes
AnswersFind the given doubly linked list is palindrome or not.
- kumar February 19, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Linked Lists - 0of 0 votes
AnswersDesign a system for implementation of stock market.
- jkjain.7884 February 17, 2017 in India
Buyer and seller case. stock server will receive buy request and sell request. A sell can be successful when it matches the quantity and price for same stock.
There will be many request for buyer and seller . Need to select the appropriate one.
Which data structure will be used ? how to handle concurrency issue?class diagram?| Report Duplicate | Flag | PURGE
Amazon Dev Lead System Design - 1of 1 vote
AnswersGiven an array arr and a number n, you have to find whether there exist a subset in arr whose sum is n. You have to print length of the subset.
- mohit February 17, 2017 in India
1. There exists only one subset like that
2. All number in arr are positive| Report Duplicate | Flag | PURGE
Amazon SDE1 Dynamic Programming - 0of 0 votes
Answerslist1 -->aaa,bbb,ddd,xyxz,...
- codemarathon February 09, 2017 in United States
list2-->bbb,ccc,ccc,hkp,..
list3> ddd,eee,,ffff,lmn,..
Inside a list the words are sorted
I want to remove words which are repeated across the list and print in sorted order
If the words are repeated in same list its valid.
In the above case
it should print aaa-->ccc-->ccc-->eee--->fff-->glk-->hkp-->lmn-->xyxz| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 0of 0 votes
AnswersWrite a program to compress a string and send it a over a network and decompress it on the receivers end
- nivasd16 February 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersSome questions about how to write a immutable class.
- yankeson2013 February 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 0of 0 votes
AnswersFind top n cities which got most orders. For example, amazon got a list of orders, and these orders will be shipped to different cities.
- yankeson2013 February 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 0of 0 votes
AnswersI have a file which has a number of 10 digit numerals and 10 digit alphanumeric characters. Write a UNIX basic command to print distinct 10 digit alphanumeric charters
- priyanka.mandal1691 February 08, 2017 in India
Sample Input
1234567890
1234567890
123456789X
0974385495
Expected O/P
123456789X| Report Duplicate | Flag | PURGE
Amazon SDE1 Unix - 0of 0 votes
AnswerDelete files of size more than 100mb in a folder which are older than 90 days.
- priyanka.mandal1691 February 08, 2017 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Unix - 0of 0 votes
AnswersGiven a comma separated file print the last but one column of every line.
- priyanka.mandal1691 February 08, 2017 in India
e.g:
a,b,c,d,e,f
1,2,3,4
w,x,y,z
output should be
e
3
y| Report Duplicate | Flag | PURGE
Amazon SDE1 Unix - 0of 0 votes
AnswersA binary tree and a number, say k are given. Print every path in the tree with sum of the nodes in the path as k.(A path can start from any node and end at any node, i.e. they need not be root node and leaf node; and negative numbers can also be there in the tree)
- SIVA R February 07, 2017 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 0of 0 votes
AnswersDesign Amazon Recommendations Feature. Focus on designing how would you store and make it accessible fast? What would be class design like for the class which would provide list of products which people bought similar to a given product? How would you test that class?
- Anonymous February 07, 2017| Report Duplicate | Flag | PURGE
Amazon SDE-2 Data Structures Database Object Oriented Design - 0of 0 votes
AnswersLinkedList Reverse
- kumarami663 February 05, 2017 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Java - 1of 1 vote
AnswersWrite a program to reveres string from intervals
- kumarami663 February 05, 2017 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Coding - -1of 1 vote
AnswersWrite a iterator wrapper to remove duplicates from collections without using temporary storage.
- dmh February 04, 2017 in United States
For Example:
ArrayList A = {RAT,CAT,BAT}
ArrayList B = {RAT,CAT,MAT}
ResultIterator itr = new ResultIterator();
itr.next() should display {RAT,CAT,BAT,MAT}
Program skeleton:
class ResultIterator {
ResultIterator(iterator itr1, iterator itr2) {
}
bool hasnext {
// implement this method
}
E next() {
// implement this method
}
}| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - 6of 6 votes
AnswersQ: If you were given a series of equations e.g. [A = B, B = D, C = D, F = G, E = H, H = C]
- aonecoding January 27, 2017 in United States
and then another series [A != C, D != H, ..., F != A ]
Check whether the equations combined is valid.
For the example given, your program should return 'invalid', because the first series implies that A = C, which contradicts the statement A != C in the second series.| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 0of 0 votes
AnswersGiven two sorted arrays A and B that may have repeated elements. Form a new sorted array C that contains the elements of A and B [Condition : You are not allowed to merge the two arrays and then sort. ]
- nidhi.prakash.410 January 23, 2017 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersGiven an array , find the element (say X) that has all the elements less that it to its left side and all the elements greater to it on its right side.
- nidhi.prakash.410 January 23, 2017 in India
The left and right elements of X need not be in sorted form.| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 1of 1 vote
AnswersFind the maximum consecutive 1's in an array of 0's and 1's.
- nidhi.prakash.410 January 23, 2017 in India
Example:
a) 00110001001110 - Output :3 [Max num of consecutive 1's is 3]
b) 1000010001 - Output :1 [Max num of consecutive 1's is 1]| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Coding - 0of 0 votes
AnswersWrite test cases on Whatsapp group chat
- nidhi.prakash.410 January 23, 2017 in India| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing