Amazon interview Experience | Set 412 (SDE II)

Overall process time : 2 months(Sep’17 to Nov17)
Overall 60+ people
Total Rounds : 6
Overall Difficulty : 2.5 – 3
Round 1:
(3 codes on paper )

  • Given a set of yesterday Amazon stock prices {2, -3, 5, 8, 1}
    Write a code to buy and sell those stocks at maximum profit.  Before sell, you must buy it at minimum price.        There should be one minute gap between buy and sell. Gain maximum profit by buying and selling 1 unit (very simple need to find min and max, I did it using thread join) GeeksforGeeks Link
  • Convert a BST to a sum tree
  • Given a 1D Array. Return True if there exists an element where a[i]+a[j] = 0 && i!=j. Reference : Find Pair Given Difference
    Input: arr=(2,-3,4,1,-6,-4,1}
    Output: True
    Input: arr={2,3,4,1,-6,4,1}
    Output: False

Round 2: