Tip 1 : Always be confident on your programming basics
Tip 2 : Prepare at least one good project (and 1-2 normal basic project)
Tip 3 : Prepare well for basic interview questions
Tip 1 : Write a powerful summary statement
Tip 2 : Never mention a false certificate or skill in the resume
The online test consists of 2 coding questions to be completed in 70 minutes. The questions are of medium difficulty level.



A subarray is a contiguous subset of an array.
The array may contain duplicate elements.
The given array follows 0-based indexing.
It is guaranteed that there exists at least one subarray of size K.
A Simple Solution is to generate all subarrays of size k, compute their sums and finally return the maximum of all sums. The time complexity of this solution is O(n*k).
An Efficient Solution is based on the fact that sum of a subarray of size k can be obtained in O(1) time using the sum of the previous subarray of size k.
This is basically sliding window problem.
My interviewer asked me to introduce myself and then jumped into coding questions.
Overall I was able to solve both the questions in under 50 minutes.
Later we had a casual discussion on projects and work culture at Amazon for a few minutes.



I gave him an optimized solution and discussed its time complexity



1 2 3
4 5 6
For the above 2*3 matrix , possible paths are (1 2 3 6) , (1 2 5 6) , (1 4 5 6).
You can return the paths in any order.
He gave an introduction about himself and asked me to do the same. Later he asked me a coding question.
He then showed me multiple code snippets and asked me to calculate time complexities for each of them.
I answered it in 45 minutes and then we discussed about roles and responsibilities of the job.



1) If the left subtree exists it should contain only nodes with values less than the current node's value.
2) If the right subtree exists it should contain only nodes with values greater than the current node's value.
3) Both the left and right subtrees should also be Binary Search Tree.

For the above binary tree, the BST with the maximum possible sum is marked with RED colour, the sum of this BST is equal to 6.
We had a discussion on my previous projects for around 30 minutes. He then asked me a few behavioral questions.
Tell me about a time when you have exceeded expectations.
Why Amazon?
Tell me about a time when you have delivered late? If yes what was the reason for the delay?
Dislikes and likes
Why do you want to leave your current company?
Tip 1 : Answer Honestly
Tip 2 : Don't get tripped
Tip 3 : Prepare well in advance for common questions

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?