Amazon Interview Report
- 0of 0 votes
AnswerGiven a fully connected graph with n nodes and corresponding values. One node can interact with other node at a time, to replace/ignore/add its value to other node’s value. Assuming this operation takes 1 unit of time, how much time would it take for all the nodes to have value equal to sum of all the nodes.
- neer.1304 August 30, 2017 in United States
Examples : Given a graph with values {1,2,3,4}, find total time it takes, such that all nodes have value as 10.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven any two nodes in a binary tree, find the path from 1st node to another, and tell if the path is a straight line, or there are turns on the line, find number of turns.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven data of millions of people, (name, age, M/F etc.) Develop an API that will have age range as input and yield the count of people under this range as output.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven a chessboard, find minimum number of moves for a knight to reach from source to destination.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersFind the maximum difference between any combination of child and parent node in a given binary tree. Here child node can be any level below parent node, but should be in the same sub tree starting from parent node.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersGiven a dictionary of words and a string pattern. Output the count of words that match the string pattern in the dictionary.
- neer.1304 August 30, 2017 in United States
Eg. Dictionary: [cat, rat, mat, apple, boy, bat]
String pattern: ?at
Output: 4 (because cat, rat, mat, bat matches the string pattern)| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
AnswersDesign Truecaller. Both HLD and LLD.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 design - 1of 1 vote
AnswerA T20 match is going on. You’re in Team B. First innings is over, they have scored “teamARuns” runs. Your team has scored “teamBRuns” runs at the end of “balls” balls. A ball can have multiple possibilities like [0, 1, 2, 3, 4, 5, 6, Wicket, No ball, Wide ball]. What is the probability that your team (Team B) will win?
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 1 vote
AnswersGiven a Singly Linked list, Update the second half of the list such that n-th element becomes sum(1st + nth) element, (n-1)st element becomes sum(2nd + n-1st) element and so on. Eg: 2->3->4->5->6 => 2->3->(4+4)->(5+3)->(6+2)
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm