Tip 1 : Be confident and clear with your answer
Tip 2 : Prepare for Leadership Principles/Situations as well
Tip 3 : Be Precise with your answer
Tip 1 : Have a decent amount of projects
Tip 2 : Some internship experience is a bonus
There were three sub-part of this round. Links were provided to us one week earlier and we had the freedom to complete the test within the next 10 days.



1. The integers x,y and z might not be distinct , but they should be present at different locations in the array i.e if a[i] = x, a[j] = y and a[k] = z, then i,j and k should be pairwise distinct.
2. The integers a,b and c can be present in any order in the given array.
It was online face-to-face interview with an Amazon Engineer. The interview was rather friendly, but they were looking for leadership principles more than the actual coding problems.
Some Leadership Questions were like: Have I ever been in a situation where I made a huge mistake? How did I approach the team about it? How did I resolve it? What did I learn from it?



You can’t sell without buying first.
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
It was another online face-to-face interview. The interviews were back-to-back. So, be well prepared that you may have to sit for 3 hours continuously and give interview.



Output the sum modulo 10 ^ 9 + 7.
If ‘X’ = 1, ‘Y’ = 1 and ‘Z’ = 0 then the output will be 84.
Explanation : 3 + 4 + 34 + 43 = 84

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?