Amazon Interview Questions
- 1of 1 vote
AnswersGiven sequentially placed boxes, each representing a number( which may be positive or negative), we need to select the numbers in order to have the maximum sum, having the constraint that if we select a given box, we cannot select adjacent box to it, but can select any other.
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersGiven 2 integers, add them without using any arithmetic operator
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersImplement a LRU cache with ttl at each block
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersGiven some resources in the form of linked list you have to delete all the resources which sum up to 0(Zero) and return the remaining list.
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersFind all anagrams of a given string in a file of size 1TB.
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 1of 1 vote
AnswersGiven two strings print all possible permutations of two strings such that the order of characters are maintained.
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersGiven an array,generate all valid ip address from the array.
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersFind Longest Repeated Substring in the given string.
- neer.1304 March 09, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 1of 1 vote
AnswersTable: Student
- padmarajuharish March 08, 2017 in United States
Fields: Student_ID, Department, Start_Date
ex: 1,A, 2017-01-1
1,B, 2017-07-1
1,C, 2017-12-1
Expected Output: Student_ID, Department, Start_Date, End_Date
ex: 1,A, 2017-01-1, 2017-07-01
1,B, 2017-07-1,2017-12-01
1,C, 2017-12-1, ...
End_Date is the start Date of the next record for the student ID| Report Duplicate | Flag | PURGE
Amazon SQL - 0of 0 votes
AnswersGiven a equi-weighted uni directed graph and need to find the max distance possible from a given node.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersAdd 1 to the integer represented by a linked list with O(n) time, O(1) space, no recursion(stack space) and without reversing the linked list.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersDesign an OOP concept for an application where employee can dispatch their incoming phone call according to their seniority level if they are not able to solve.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 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.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswerWrite a program to check whether it is a valid binary tree or not.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersMultiply two numbers represented as a linked list.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersA ‘plus’ pattern of size 1 is defined as following :
- neer.1304 March 08, 2017 in United States
1
1 1 1
1
size 2 :
1
1
1 1 1
1
1
Find size of largest plus pattern in given 2D matrix which has only 0s &1s.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
Answers1. Difference between arrays and link list
- JSDUDE March 08, 2017 in United States for Alexa
1.1 How to prepend each of the above with extra data
2. Hash-table. What datastructure to use to create one. How to resolve collision| Report Duplicate | Flag | PURGE
Amazon Software Developer Data Structures - 0of 0 votes
Answers/*
- JSDUDE March 08, 2017 in United States for Alexa
Amazon employees are encouraged to learn and be curious, and this means employees can transfer teams within the company easily.
This usually means they'll move to a new building, and for those who have parking, they'd need to swap parking spots.
The task is that given a list of employees who want to swap parking spots, write a function that can match them up 1 to 1.
The output can simply be tuples of aliases.
Each alias should only be matched once.
Input-
alias fromBuilding toBuilding
adrian building1 building2
john building2 building1
andrew building3 building2
william building4 building3
John building2 building4
Doe
output-
adrian,john
*/| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - 0of 0 votes
AnswersGiven a sorted array which has been rotated n number of times. Find the value of n.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersClone the binary tree.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersIn a binary tree return the maximum "turns" in tree. A "turn" is defined as LRL or RLR traversal.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersReturn the maximum length sequence containing consecutive numbers from a binary tree.
- neer.1304 March 08, 2017 in United States
90
/ \
1 66
/ \
2 67
/ \ /
5 4 68
/ \
99 100
Consecutive sequence of maximum length: [66, 67, 68] of length 3.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersImplement Tower of Hanoi without using recursion.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersA stepping number is defined as a number in which the absolute difference between the consecutive digits is not greater than 1, A stepping number cannot be a single digit number. You have to find the number of stepping numbers between n1 and n2 where n2 > n1 and n2, n1 > 0.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven a stack of integers of size n, you have to sort it using only push and pop operations in O(1) space.
- neer.1304 March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven a tree return the number of elements for the level with the maximum elements.
- neer.1304 March 07, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
AnswersGiven an array it can be of 4 types
- neer.1304 March 07, 2017 in United States
(a) Ascending
(b) Descending
(c) Ascending Rotated
(d) Descending Rotated
Find out which kind of array it is| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
AnswersTurtle is on a N * N grid, with N obstacles. The turtle can only move F orward one position
- rathin91 March 07, 2017 in India
and can turn L eft or R ight. The grid has 4 directions N, E, W, S
Assuming that the initial position of turtle is 1, 1 (bottom left corner of the grid facing North) and
the grid has random obstacles in a few of its cells, given the movement instructions, find the
final position of turtle and printing the grid state will be an added plus. When there is an
obstacle, movement is not possible.
input :
FFFRRFLF
output:
2,3 E| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersGiven a decendents of nodes, write an algorithm to find whether it is a tree or a graph?
- optimisticsuperman March 07, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersDesign a conference room booking system for a company which can have offices in multiple cities, each city can have multiple buildings, each building can have multiple floors, each floor can have multiple rooms. Each room can have features like capacitiy, video conferencing available, etc.
- Vineet March 06, 2017 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design