SDE-3 Interview Questions
- 0of 0 votes
AnswerWrite a program for skyyscrapper?
- CareerCupUser1 July 09, 2016 in United States
http://www.conceptispuzzles.com/index.aspx?uri=puzzle/skyscrapers/techniques| Report Duplicate | Flag | PURGE
Google SDE-3 Algorithm - 0of 0 votes
AnswersWhen do you receive error 404 on JSP?
- basav.d May 19, 2016 in India for Release Mgmt| Report Duplicate | Flag | PURGE
JP Morgan SDE-3 Debugging - 0of 0 votes
AnswersWrite algorithm to find mid element in the linked list
- basav.d May 19, 2016 in India for Release Mgmt| Report Duplicate | Flag | PURGE
JP Morgan SDE-3 Algorithm - 2of 2 votes
AnswersFind the minimum (index) distance sum of 3 words. For example: arr = {"2", "1", "0", "2", "0", "3", "0"}, input = "1","2","3". The result should be 8 since the 2nd "2" and "1", "3"'s distance are 3, 1, 5 and abs(3,1)+abs(3,5)+abs(5,1)=8.
- lifeGoGoGo April 01, 2016 in United States
Implement this in O(N)| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 1of 1 vote
AnswersGiven a million list of co-ordinates in the form of longitude and latitude just as Google maps .How will you print closest k cities to a given location .
- neer.1304 March 06, 2016 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswerGiven start time and end time of parking (below is the table of price rule). Come up with data structure you can store these price rules
- neer.1304 March 06, 2016 in United States
Price Rules:
On Weekday On Weekend
Hours Price Hours Price
0 – 2 $5 0 – 2 $8
2 – 6 $10 2 – 6 $13
6 – 12 $15 6 – 12 $18
12 – 24 $20 12 – 24 $25
Design an architecture for the system which shows parking spaces available near customer's location in a mobile app.| Report Duplicate | Flag | PURGE
Amazon SDE-3 Software Design - 0of 0 votes
AnswersAssume you have a function isAccountHacked(String username) This function is called by a system whenever a there is a failed login by a particular username.
- sathipkr February 18, 2016 in United States
The function returns true if there have been "n" consecutive unsuccessful login attempts in the last 1hr/36,000 seconds.How will you write this method.I was asked this question in an interview and I came up with few solutions of logging last n timestamps in 1 hr.
He wanted a solution with space complexity of timestamps less than O(n).Let me know if you need any more details| Report Duplicate | Flag | PURGE
SDE-3 Algorithm - 0of 0 votes
AnswersYou have a stream of numbers coming in (lets say more than a million). The numbers are between [0-999). Implement a class which can
- ranganath.mr February 16, 2016 in United States
insert(int i);
getMean();
getMedian();
in constant time O(1).| Report Duplicate | Flag | PURGE
Thumbtack SDE-3 Algorithm Data Structures - 0of 0 votes
AnswersGiven a string that represents an integer with no upper bound (billions, trillions, etc..), write a function "convert" that returns the integer value of the string. For example: "1000322" returns 1000322.Try to do this in O(1) space, and O(n) time. Better if possible.
- william.brandon.lee83 January 18, 2016 in United States| Report Duplicate | Flag | PURGE
Microsoft SDE-3 Algorithm - 0of 0 votes
AnswersGiven a binary tree, write a function LCA that returns the least common ancestor of two nodes. This is not a BST. Try not to use parent pointers in the custom Node class.
- william.brandon.lee83 January 18, 2016 in United States
Iterative solution takes O(1) space, recursive solution takes O(n) space.| Report Duplicate | Flag | PURGE
Microsoft SDE-3 - 0of 0 votes
AnswersGiven a list of IP address correspondences, such as
- william.brandon.lee83 January 18, 2016 in United States
IP1 = IP2
IP3 = IP4
IP3 = IP2
IP5 = IP6
IP7 = IP8
etc.
Return a list of unique IP addresses. In this case
IP1, IP5, IP7
Consider IPs as Strings or any other data type.| Report Duplicate | Flag | PURGE
Microsoft SDE-3 Algorithm - 0of 0 votes
AnswersGiven a list of integers (array or list), write a function that returns true if the list can be split into two lists that have an equal sum.
- william.brandon.lee83 January 18, 2016 in United States
Example: {4,2,2,0,-1, 1} returns true
{4}, {2,2,0,-1,1}
and {3,3,1} returns false.
Hints by interviewer:
- Complexity is 2^n| Report Duplicate | Flag | PURGE
Microsoft SDE-3 Algorithm - 0of 0 votes
Answerthere are n ranges of numbers, we need to find the kth smallest element.
- avishkar11 October 17, 2015 in India
One way to find it is to perform a merge sort and return the kth element. but we don;t have extra space. For that we need to write the algorithm,
eg:
[2-8]
[5-10]
[7-20]
5th smallest element is 5. 10th smallest element is 7.| Report Duplicate | Flag | PURGE
NetApp SDE-3 Algorithm - 0of 0 votes
AnswersGiven an array of integers you to find the range l,r such that and operation of largest two element in that range is maximum.
- ritwik_pandey August 09, 2015 in India
For example:
Input
6 1 6
Output
1 3
You have to print lexicographically smallest range.| Report Duplicate | Flag | PURGE
SumoLogic SDE-3 String Manipulation - 0of 0 votes
AnswersGiven a matrix of n*n. Each cell contain 0, 1, -1.
- ritwik_pandey August 09, 2015 in India
0 denotes there is no diamond but there is a path.
1 denotes there is diamond at that location with a path
-1 denotes that the path is blocked.
Now you have start from 0,0 and reach to last cell & then return back to 0,0 collecting maximum no of diamonds.
While going to last cell you can move only right and down.
While returning back you can move only left and up.| Report Duplicate | Flag | PURGE
SumoLogic SDE-3 Dynamic Programming - 2of 2 votes
AnswersHow will you serialize the binary tree ?
- algeek July 08, 2015 in India| Report Duplicate | Flag | PURGE
Amazon SDE-3 Algorithm - 0of 0 votes
AnswersGiven huge database of songs design search data structure and algorithm to search all songs with words starting with the letters entered and words matching the sequence of words entered.
- emptycup July 06, 2015 in India
Suppose the songs are:
1. Every night in my dreams
2. Listen to my heart
3. Show me the meaning
4. Night in London
5. Night changes
Entering "m" should list 1,2 and 3. "my" should list 1 and 2. "Night" should list 1,4 and 5. "Night in" should list 1 and 4.| Report Duplicate | Flag | PURGE
Flipkart SDE-3 Data Structures - 0of 0 votes
AnswersGiven access to live stream of purchases, design the algorithm to list the top 100 products in past X minutes/hours/days.
- emptycup July 06, 2015 in India| Report Duplicate | Flag | PURGE
Flipkart SDE-3 Algorithm - 0of 0 votes
AnswersImplement a meeting organizer
- emptycup July 06, 2015 in India| Report Duplicate | Flag | PURGE
Flipkart SDE-3 System Design