Amazon Interview Report
- 0of 0 votes
AnswersRound 5: Q1:
- Abee July 20, 2011
Write a function that takes an integer and returns a char array that contains the -2 base representation of the given integer.
Example:
Input Output
7 11011
3 111
2 110| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 2of 2 votes
AnswersRound 1: Q2:
- Abee July 20, 2011
Puzzle
Given 25 horses, find the best 3 horses with minimum number of races. Each race can have only 5 horses. You don't have a timer.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Brain Teasers Highbridge Capital Deshaw Inc - 0of 0 votes
AnswersRound 3:
- Abee July 20, 2011
General Discussion about the current work & work-culture.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersRound 2: Q1:
- Abee July 20, 2011
Given 2 unsorted arrays, find the intersection of the two arrays (optimal soln).
He was asking for various approaches and complexity in all those approaches.
Finally, he was interested in the solution using array-sorting.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Arrays - 0of 0 votes
AnswersWritten: Q1:
- Abee July 20, 2011
Given a binary search tree and a value X, find the node with value immediately greater than X.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWritten: Q3:
- Abee July 20, 2011
Given a string, compress using run-length encoding.
Example:
Input: aaabbac
Output: a3b2ac| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersRound 5: Q2:
- Abee July 20, 2011
Design an algorithm to find the immediate greater number to a given number, such that the result has the same digits as the given input number.
Example:
Input Output
1234 1243
1243 1324
Hint: Next Permutation of the given number| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersRound 1: Q1:
- Abee July 20, 2011
Given a matrix, print it spirally.
Input:
1 2 3
4 5 6
7 8 9
Output: 1 2 3 6 9 8 7 4 5| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Arrays - 0of 0 votes
AnswersRound 2: Q2:
- Abee July 20, 2011
Given a tree, in addition to the left and right pointer, it has a third pointer, that is set to NULL.
Set the third pointer to a node, which will be the successor of the current node, when the tree is traversed in the zig-zag order. In other words, if we traverse the tree using this third pointer alone, then we will be traversing the tree in the zig-zag order.
Input:
(Plz construct the tree using the pre-order and in-order traversals)
Pre-order: 1 2 4 5 3 6 7
In-order: 4 2 5 1 6 3 7
So, after the pointer is fixed, the traversal of the tree using the third pointer should give,
1 3 2 4 5 6 7| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Trees and Graphs