Last week, I gave the 1st round interview for SDE II role for Amazon.
DSA Questions:
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.Leadership Principles:
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.