Amazon Interview Questions
- 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 - 0of 0 votes
AnswersDesign a music streaming service like Pandora.
- sarunreddy82 May 28, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon System Design - 0of 0 votes
AnswersHow you will design and make a website like Hackerrank? How you will measure and limit the running time and memory usage of the program.
- johnallen582 May 25, 2018 in India for AWS| Report Duplicate | Flag | PURGE
Amazon Software Developer System Design - 1of 1 vote
AnswersDesign a class for converting integer to Roman numerals.
- CoderLonely May 24, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 1of 1 vote
AnswersGiven k, and a binary string, determine if this contains all permutations of length k.
- ajay.raj May 24, 2018 in United States
For example, 11001 contains all possible binary sequences with k=2 (00,01,10,11)| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersDesign the Goodreads recommendation model.
- csk May 23, 2018 in United States
Goodreads is a "social networking book" website that allows individuals to freely search its database of books.
- Any given user has a List of friends.
- User can add books to his/her shelve
- When a user logs in, we need to show the top 10 books owned by his friends
Example:
User1 has u2, u3, u4, u5 as friends
u2 owns b1, b2, …b10
u3 own b1, b2, b11…b20
u4 owns b1, b2, b11…b20
u5 owns b1, b33, b35, etc
topmost book is b1, second topmost book is b2 and so on.
If you maintain a cache of top 10 books in the user object for each of the users. How often will you update the cache ?| Report Duplicate | Flag | PURGE
Amazon - 0of 0 votes
AnswersYou have been given a generator string ab from which any number of strings can be generated recursively by inserting ‘ab’ at any location. You have been given an input string to check if that given string is valid or not.(i.e. generated by given with given string.)
- akisonlyforu May 22, 2018 in India
eg.
Input: aabbab
Output: valid
Input: abbaab
Output: Invalid
I could not come up with a algorithm less than O(N*N)| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswerGiven a multiple tree, and multiple nodes that need to be deleted,
- ajay.raj May 17, 2018 in United States
It is required to return a list of nodes so that the children of these nodes can be found after the nodes have been deleted.| Report Duplicate | Flag | PURGE
Amazon SDE1
Open Chat in New Window