Amazon Interview Report
- 0of 0 votes
AnswersGiven an array of stock values of a company. Find out the time when a user would have bought the stock and sold the sock. Basically find the maximum positive difference of any two given elements in an array?
- avinash.setty December 12, 2015 in United States for Marketplace| Report Duplicate | Flag | PURGE
Amazon SDE-2 Arrays - 1of 1 vote
AnswersYou have a BST and you need to assign an appropriate value to neighbor of all nodes (Explained in below example)
Node Structurenode { node leftChild, node rightChild, T data, node neighbor }
A
- avinash.setty December 12, 2015 in United States for Marketplace
/ \
B C
/ \ \
D E F
Based on above tree,
Node: Neighbor
A: NULL
B: C
D: E
E: F| Report Duplicate | Flag | PURGE
Amazon SDE-2 Trees and Graphs
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.