Amazon Interview Questions
- 1of 1 vote
AnswerGiven a series of equations e.g. [A = B, B = D, C = D, F = G, E = H, H = C]
- aonecoding4 December 25, 2018 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 - -1of 1 vote
AnswersImagine you have a computer keyboard that has all the letters mismatched
- klausv December 23, 2018 in United States
example:
typing q gives you a
typing w gives you b
all 26 letters in the alphabet are there, but typing one letter will give you another one
you are asked to write an algorithm to find whatever word you tried to type and count how many cycles you did to find the word
a restriction was set you need to type the whole word every time, not go character by character
note: a graph was suggested to represent the letter mappings| Report Duplicate | Flag | PURGE
Amazon SDE-2 Trees and Graphs - 3of 3 votes
AnswersHow to find out distinct ngrams from a email_alias.
- ashwini.padhy89 December 05, 2018 in India
For instance xyz@gmail.com here the email_alias is xyz.for xyz if we want to find bigram then function should have input the email_id,and the number of grams lets say 2.
Than it has to return the distinct count of ngrams present in the email_alias.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Coding - 0of 0 votes
AnswersYou have two files in hdfs one having date range with two columns start date and end date and another having two column with date and visitors field. You have to write a spark code which gives date range having maximum no. of visitors using that two files.
- tokritijain October 30, 2018 in India| Report Duplicate | Flag | PURGE
Amazon Data Engineer - 0of 0 votes
AnswersGiven an array which represents columns, find the position of two columns which when removed will trap the maximum amount of water. This is related to trapping raining water problem.
- Ashish October 17, 2018 in India| Report Duplicate | Flag | PURGE
Amazon Software Developer - 0of 0 votes
AnswersGiven an unsorted array find the maximum distance between two elements satisfying the condition A[i] < A[j] where i < j. There will always be a solution.
- Ashish October 17, 2018 in India
For eg. 6, 9, 3, 2, 10, 2, 3| Report Duplicate | Flag | PURGE
Amazon Software Developer - -2of 4 votes
AnswersHow should I prepare for the interview with Alexa team at Amazon?
- ihsihs005 October 17, 2018 in United States for Alexa| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 0of 0 votes
AnswersGiven max. travel distance and forward and backward route list, return pair of ids of forward and backward routes that optimally utilized the max travel distance.:
- rahul October 10, 2018 in United States
eg: max travel distance is : 11000
forward route list : [1,3000],[2,5000],[3,4000],[4,10000]
backward route list : [1,2000],[2,3000],[3,4000]
Result : [2,3] ...2 is from forward and 3 is from backward...total distance is 9000...no other combination is there which is >9000 and <=11,000.......0(n^2) solution is straight forward, thinking that sorting both might help.| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 1of 1 vote
AnswerGiven an array, coin of size n, coin[i] denotes the no. of coins on the position i. Can move any number of coins from the position i to (i+1) or (i-1). What is the minimum no. of moves required to redistribute the coins, so that each position i has at least 1 coin ?
- 00pzz October 06, 2018 in India
Note: Summation of total coins on the array is exactly n.| Report Duplicate | Flag | PURGE
Amazon Software Developer Arrays - 0of 0 votes
AnswersGiven multiple input streams of sorted numbers of infinite size, produce a single sorted output stream.
- sanjos October 01, 2018 in United States
(The size of all the input streams are unknown)
For eg.
Input Stream 1: 2,4,5,6,7,8...........
Input Stream 2: 1,3,9,12..............
Input Stream 3: 10,11,13,14........
Output Stream:
1,2,3,4,5,6,7,8,9,10,11,12,13...............| Report Duplicate | Flag | PURGE
Amazon SDE-3 Data Structures - 0of 0 votes
AnswersGroup orders by items present in the orders.
- hrmishap September 05, 2018 in United States
Class Order{
String orderId;
List<String> items;
}
Given Order id and items:
O1: [A, B]
O2: [B, C]
O3: [D, E]
Output: [[O1, O2], [O3]]
Note: There can be more that 2 items in an order.
List<List<String>> implementhis(List<Order> orders){
}| Report Duplicate | Flag | PURGE
Amazon - 0of 0 votes
AnswersDesign an email client where you can only send emails to people who are present in your contact list. Build for only the following functionaliy
- vardaansh1 August 26, 2018 in India
1) Send/Receive Emails
2) Add/Remove Contacts
3) See Inbox
4) See Sent Mail| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersDesign a distributed LRU Cache.
- vardaansh1 August 26, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 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 - 0of 0 votes
AnswersWhat would be the sample class design of notification system?
- abc.xyz August 14, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersWhat would be the sample class design of tic tac toe game?
- abc.xyz August 14, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswersWhat would be the sample class design of Outlook like meeting scheduler?
- abc.xyz August 14, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 - 0of 0 votes
AnswerGiven two arrays. One is for tasks (Processes) and each element depicts the amount of cores required to run the task. 2nd array is an array of CPU where each element depicts the no of cores in it.We have to tell how many maximum number of tasks can be allocated. Example: Task: [3, 5, 7], Cores: [1, 3, 5] . Here only task 0 and 1 can be allocated to CPU 1 and 2 . So, answer=2.
- Anil Kumar July 23, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 2 votes
AnswersWhat is the best way to generate first N primes? (not primes up to N but first N primes)
- koustav.adorable July 22, 2018 in United States for Amazon Prime| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 2 votes
AnswersDesign Amazon prime video
- koustav.adorable July 07, 2018 in Dublin for AWS| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 0of 0 votes
AnswersHow would you design a system where you have 1000 records in database and on UI you are showing them, a user can select single or bulk record which can be in any order and drag drop to reorder the sequence of the record. Example :
- Random1 June 26, 2018 in United States
I have below records
1
2
3
4
5
a user selects 1 and dragdrops it on 5th position, so the new order becomes 2,3,4,5,1. This has to be done at the database layer and in efficient way. How to maintain continuous reordering sequence of records?| Report Duplicate | Flag | PURGE
Amazon Backend Developer Knowledge Based - 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 - -4of 4 votes
AnswerTwo Sum. Then follow up three sum
- James666 June 23, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon Software Developer - -1of 1 vote
AnswersHow is design review done?
- abc.xyz June 19, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersGiven a BST of memory sizes. Find best fit for a memory block of size M.
- akisonlyforu June 11, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 0of 0 votes
AnswerGiven an infinitely large array and every element has tags associated with them, and there are about 10,000 tags (say) then sort the given array to get all tag-0’s first, tag-1’s next and so on in O(n).
- Ankita June 10, 2018 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - -1of 3 votes
AnswersFor Amazon SDE-1 On Campus Interview, what are the topics I should study in Database Management ?
- akisonlyforu June 08, 2018 in India
Just don't name the topics. Please elaborate too.| Report Duplicate | Flag | PURGE
Amazon SDE1 Database - 0of 0 votes
AnswersGiven a random MxN matrix and a positive integer, recursively Your program should then find a continuous path thought the matrix starting at position 0,0 that will sum to n. Your program shouldomly move left (col -1), right(col +1), up (row -1) and down (row+1)and can only use a position once in the sum. if there is a such path in the matrix, create the path in a separate matrix with the same size, and replacing the indices used with 1 and the rest 0.
- stingerviii June 02, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm