Tip 1: Be very comfortable with writing production-ready code; this will come from continuous practice.
Tip 2: Make sure you know and understand Amazon's core values.
Tip 1: Include at least two projects if you are a fresher.
Tip 2: Try to highlight the impact you have made.



I tried to do a basic traversal of the Matrix first but soon realised it to be a DFS question.
Then I used the DFS algo but had to use another Matrix to store info.
The interviewer asked me to provide a better solution without using this extra space. I was not able to complete that in time though.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Reversing the linked list was pretty straightforward with a pointers approach.
Post solution, the interviewer asked me to explain how the solution I wrote works in principle.
The interviewer asked some questions about pointers and how they work.
Which data structure would you use to create a dictionary?
I suggested maps, discussion on why maps, and how they would work. Some discussion around hashing.
Discussion on whether can we use Linked lists.
Tip 1: Try expressing your thoughts with as much clarity as possible.
Tip 2: Usually interviewer is more interested in how you think than hearing a specific answer with this kind of discussion.


Alice took a sorted array = [4,6,8,10,11] and if she rotates it by 3, then the array becomes: [8, 10, 11, 4, 6].
I first approached the problem by finding all the pairs.
The interviewer asked me to dry-run my solution, which went well.
Then, the interviewer asked me to optimize it.
I spent some time figuring it out, but I was able to come up with the two-pointer approach and successfully coded it as well.
The interviewer requested another dry run of my optimized solution. I found some issues during the dry run, which I fixed on the go. By this time, it was already 60 minutes, so he asked to extend the interview by another 30 minutes.
We then had a discussion about my past experience, during which he explained what his job looks like, followed by some questions about evaluating core values.

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?