SDE-2 Interview Questions
- 1of 1 vote
AnswersDesign Uber. Low level Design needed (OOPS based - classes, relations, message flow etc.)
- neer.1304 March 28, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswerDesign Cricinfo website
- neer.1304 March 28, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersDesign snake n ladder game to be played online
- neer.1304 March 28, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 0of 0 votes
AnswersGiven a movie X that the user had watched, write an algorithm to suggest more movies to the user. How to display the other movies based on same genre?
- suneel March 24, 2017 in India| Report Duplicate | Flag | PURGE
ADP SDE-2 Algorithm - 0of 0 votes
AnswersHow to Design an Meeting scheduler
- DuttaJ March 23, 2017 in India| Report Duplicate | Flag | PURGE
Flipkart SDE-2 Algorithm - 0of 0 votes
AnswersImplement a Message Broker, with Publisher and Subscriber. There can be multiple Topic or Subject in Message Broker.
- DuttaJ March 23, 2017 in India| Report Duplicate | Flag | PURGE
Flipkart SDE-2 Coding - 0of 0 votes
AnswersImplement Thread safe timer with start, stop and reset functionality.
- twarzo March 22, 2017 in India| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Threads - -1of 1 vote
AnswersFind K which decides the number of open brackets are equal to the number of closed brackets.
- AlgoBaba March 21, 2017 in United States
input : (())
output : 2
Reason : if we divide the string at 2nd position, we get two open brackets and two closing brackets, and they are same .
input : (())))(
output : 4
Reason : if we divide the string(not necessarily equally) at 4rth position, we have (()) on the left side and on the right side we have ))( , as you can see, on the left half, we have two opening brackets and on the right half we have two closing brackets and they are equal .
input : ))
output : 2
Reason : there is no open brackets , so if we divide taking the whole string's length, we have )) on the left half and nothing on the right half. Now you can see that on the left half there is no open brackets and on the right half there is no closed brackets.
This question should be clear by now and remember you have to find out that K .| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersFind the Maximum number of distinct nodes in a binary tree path
- AlgoBaba March 20, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
Answersfind the given Binary tree is mirrored tree or not
- Jagadeesh March 12, 2017 in India for Kindle
should be like
60
/ \
30 30
/ \ / \
20 50 50 20| Report Duplicate | Flag | PURGE
Amazon SDE-2 Trees and Graphs - 0of 0 votes
AnswersGiven a BST (Binary Search Tree) , Each node value should replace with sum of the node which are greater-than the given node.
- Jagadeesh March 12, 2017 in India for Kindle
conditions :
No Extra space / variable can use
Modify the existing tree in optimal way.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Trees and Graphs - 0of 0 votes
AnswersMaximum triangle path Sum : Starting from the top of a pyramid of numbers like below, you can walk down going one step on the right or on the left, until you reach the bottom row:
- neer.1304 March 10, 2017 in United States
55
94 48
95 30 96
77 71 26 67
One of such walks is 55 -> 94 >- 30 -> 26. You can compute the total of the numbers you have seen in such walk, in this case it’s 205.
Your problem is to find the maximum total among all possible paths from the top to the bottom row of the triangle. In the little example above it’s 321.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersDesign a online shipment tracking system.
- neer.1304 March 10, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 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 - 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
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 - 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 - 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
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