Amazon Interview Questions
- 0of 0 votes
AnswersYou are given an array of integers. Find the minimum difference between two prime numbers(Positive or negative) in the array when present with minimum time complexity and provide the test data to test the this code.
- test January 22, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Java - 0of 0 votes
AnswersGive a large multi MB byte file in memory, a system handles delete requests for segments typically of the order of bytes. The system has a constraint that individual purge requests of byte segments are expensive, so that the no. of purges are a minimum.
- naveentmani January 21, 2017 in United States for AWS
Eg. a 5 MB file receives delete requests for offsets (1, 100), (250, 550),(1000, 1200), (400, 600), (800, 900), (1100, 1150)
Effective delete requests - (1, 100) , (250, 600), (800, 900), (1000, 1200)
The users of the system always go by the absolute byte ordering of the file. Eg. if byte 1 is deleted, the users of the system will reference the actual byte 2 as byte 2.
What data structure would you use to store these intervals such that the following operations are efficient 1. Looking up an interval 2. Inserting a new interval that has no overlap with existing ones 3. Inserting a new interval that has partial overlaps with existing intervals. This would involve collapsing the existing intervals with the new interval to form a single large interval. Eg. Interval cache: {(1, 100), (250, 550), (1000, 1200)} , new interval : (400, 700) -> Interval cache: {(1,100), (250, 700), (1000, 1200)}| Report Duplicate | Flag | PURGE
Amazon SDE-2 Data Structures - 0of 0 votes
AnswersHow to verify the string which contains alpha-bates,parenthesis and signglle/double quote
- djvirus January 21, 2017 in India
Ex: AB(CD{"GH"}) is valid
"A()B' is invalid| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswerImplement Java Set using TDD
- steelrahul January 18, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersGiven an mXn Sorted matrix and a value X. Every row is sorted and first number of every row is greater than last number of previous row Find the value X in most efficient way.
- neelabhsingh January 18, 2017 in India for Hyderabad| Report Duplicate | Flag | PURGE
Amazon SDE-2 Matrix - 2of 2 votes
AnswersGiven a Binary tree and value X. Find X in the tree and return its parent
- neelabhsingh January 18, 2017 in India for Hyderabad
X:
10
4 3
5 7 9 8
If X = 7, return 4| Report Duplicate | Flag | PURGE
Amazon SDE-2 Trees and Graphs - 1of 1 vote
AnswersRemove 3 consecutive duplicates from string.
- neerdis January 17, 2017 in India
INPUT:aabbbaccddddc
OUTPUT:cdc| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Java - 1of 1 vote
AnswersGiven two strings needle and haywards that contains ASCII characters,write an algorithm to output a list of 0-based indices of the occurances of all anagrams of needle in haystacks
- Learner_Ash January 12, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Web Developer Algorithm - 1of 1 vote
AnswersYou are given an array of integers(with all valid input) You have to write a function which will produce another array, where the value in each index of the array will be the product of all values in the given array accept that index.
- Azarbaizan January 10, 2017 in United States for Market Place
Example
Array 1: 1 2 3 4 5
Array 2: 120 60 40 30 24.
Come up with a solution of O(n^2) can you improve it?| Report Duplicate | Flag | PURGE
Amazon Software Engineer Arrays - 2of 2 votes
AnswersPrint the longest path from root to leaf in a Binary tree (Basically the nodes that lie on the height path).
- abhinavg.stack January 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon Backend Developer Data Structures - 1of 1 vote
Answersdown vote
- anony January 08, 2017 in India
favorite
Consider the following series:
A := 1
B := A*2 + 2
C := B*2 + 3 and so on...
Write a program that:
-outputs the number corresponding to a given letter;
-given a string of letters like 'GREP', computes the sum of the numbers corresponding to all the letters in the string (i.e., G + R + E + P), as given by the above series; and
-given a large number (that would fit into a standard 32-bit integer), finds the shortest string of letters corresponding to it. You may use a greedy approach for the last part. Compute the values of the numbers corresponding to letters as and when required and DO NOT pre-compute beforehand and store them in a data structure.| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - 23of 23 votes
AnswersWrite test conditions and test data to test a app which has login and signup screen on a mobile app and once you click on signup or login it takes you to a website to fill the remaining details(for sign up) or to perform any activities post login. The screens were provided with all the fields.
- kreetanshu December 26, 2016 in India| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Testing - 0of 0 votes
AnswersWrite a code for reversing letters of string in java.
- kreetanshu December 26, 2016 in India| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Java - 0of 0 votes
AnswersWrite code for implementing Binary Search algorithm.
- kreetanshu December 26, 2016 in India| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Algorithm - 0of 0 votes
AnswersYou are part of a team that develops push notifications on an app (android/iOS). The push notifications are sent out for ads published by a marketing team from a data source that they own. Come up with the test plan/cases
- sunny December 22, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswersWith the best time complexity, please come up with a code to find the minimum delta of two elements from two different arrays of integers of different sizes - a[-3, 1, 999], b[-1, 2, 3]
- sunny December 22, 2016 in United States
Edit: Please dont forget the min delta can also be from b-a not just a-b| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersDesign an ATM machine system..
- TechPrep December 20, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon System Design - 1of 1 vote
Answersgiven a stream of natural numbers ,
- salviaditya1986 December 08, 2016 in United States
and a array J contains integers in increasing orders
operations performed J = [2,3,4]
1 2 3 4 5 6 7 8 9 10…………..27....100...1111
first operation
J[0] = 2 => remove every 2nd integer
now the stream is
1 3 5 7 … 27
J[1] = 3
remove every 3rd
stream is now
1 3 7 …
3rd
given a natural number n , find if it will survive given J, or at what index it will
die.| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Algorithm - 2of 2 votes
AnswersDesign OO food delivery app catering to use cases -
- neer.1304 December 06, 2016 in United States
1) User can search different restaurant
2) User can select a restaurant
3) User sees a menu
4) Restaurant can change the menu any time
5) User adds an item from menu
6) User orders the food
7) User can track the order in real time
8) User can cancel the order
9) User pays for the order| Report Duplicate | Flag | PURGE
Amazon SDE-2 Object Oriented Design - 0of 0 votes
AnswersDesign food delivery app (OO design). Cater to use cases like search for different restaurants, selecting a restaurant, select an item from menu, menu can be updated in real time by restaurant, order the food, customer keeps track of the order in real time, payment for the order, cancel the order etc.
- neer.1304 December 06, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Object Oriented Design - 0of 0 votes
AnswersDesign Uber low level OO design. Cater to use cases like search for a ride, different category of rides, select a ride, registration for a user and driver, paying for ride etc.
- neer.1304 December 06, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Object Oriented Design - 1of 5 votes
AnswersFind sum of n elements after kth smallest element in BST. Tree is very large, you are not allowed to traverse the tree.
- gvikram244 December 06, 2016 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswersQ. Given an array of numbers. Print all the pairs (2) of numbers in the array if the sum of those numbers is also present in the array. Write in C
- bombaySE December 01, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon Arrays - 0of 0 votes
AnswersDesign and implement traffic control system, also include pedestrian signal management as part of this solution.
- Baadal November 26, 2016 in India| Report Duplicate | Flag | PURGE
Amazon Program Manager - -1of 3 votes
AnswersGiven a binary tree. I need to print the nodes in vertical line zigzag manner. For example: 1st vertical line from top to bottom, 2nd vertical line from bottom to top,3rd vertical line from top to bottom and so on
- gvikram244 November 25, 2016 in India
5
/ \
3 7
/ \ / \
1 4 6 8
/ \ \
2 9 10
Answer would be –
1
2 3
5 4 6
9 7
8
10| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test - 1of 1 vote
AnswersGiven a binary tree and a target number, return whether or not there exist a path that can create target number. All inputs are integers. Target is not a string.
- cool November 22, 2016 in United States
NOTE:: this is not path sums to target number
ex:
3
4 5
6 7 8 9
359 = return true
38 = return false
47 = return true
6 = return true| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 0of 0 votes
AnswersThere 'N' different types of routers and 'J' different types of jobs to be performed on all these routers. Design a system wherein user could easily perform these jobs on these routers.
- rsk November 14, 2016 in India
Ex- Say two types of routers are - DLink , Netgear. If user wants to change the IP address (a job), DLink exposes a public API to do it. NetGear needs the data in form of xml.
Was asked to design Entities involved and their communications, basic algorithm, data-storage logic if any.| Report Duplicate | Flag | PURGE
Amazon Software Development Manager Object Oriented Design - 0of 0 votes
AnswersWith given Binary Tree below, traverse the tree and print the tree from bottom up order
- gekko November 09, 2016 in United States for Amazon Digital Ad
1
/ \
2 3
/\ /\
4 5 6 7
output: 4567231
Hint: the traverse is called "Level Order Tree Traversal"
I hope someone memorize this traversal and pass the exam and all these companies judging canditates with one algorithm could think they hired the best canditate.| Report Duplicate | Flag | PURGE
Amazon Senior Software Development Engineer - 0of 2 votes
AnswersHow would you design Amazon Lockers?
- teli.vaibhav October 30, 2016 in United States
Amazon Lockers - Customers can use these lockers to have their products delivered. These lockers are physically available to customers at the same or several nearby zip codes.| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 0of 0 votes
AnswersThe amazon site was working just fine until yesterday. But in the past 24 hours processing the customer orders is taking a really long time.
- teli.vaibhav October 30, 2016 in United States
How would you debug and fix the issue?
When I asked if anything had changed in the past 24 hours, I was told several new products had been added after which the performance issues were noticed.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Debugging