Amazon | SDE II | Hyderabad
Anonymous User
2239

Last week, I gave the 1st round interview for SDE II role for Amazon.

DSA Questions:

  1. In an array, pick two numbers, add them and put the sum back into the array. The sum will be the operation cost performed on the array until the size of array becomes 1. Find the min operational cost. (Ref: https://leetcode.com/problems/minimum-cost-to-connect-sticks, mentioned by Floki)

e.g.

Input:  [1, 2, 2, 2, 3]
Output: 23
---
Combine 1 and 2 to get 3, resulting in [2, 2, 3, 3].
Combine 2 and 2 to get 4, resulting in [3, 3, 4].
Combine 3 and 3 to get 6, resulting in [4, 6].
Combine 4 and 6 to get 10, resulting in .
The final sum is 23(3+4+6+10), which is the minimum possible sum.
  1. A variant of Rotten Oranges.

Leadership Principles:

  1. Customer Obsession
  2. Invent & Simplify

As each post says please focus on leadership principles. I had fumbled a bit while answering.

Still, I have been selected for the next round, will post an update after the next round.

Comments (5)