Tip 1 : Must have a good grab on all data structures.
Tip 2 : Must have done some cool projects to be discussed in the bar raise round
Tip 3 : Go through all 180 questions of interview present under Amazon Company filter.
Tip 1 : Make it very simple one page
Tip 2 : Must mention your projects.
There were 2 coding questions to be solved in 105 minutes. Also we have to discuss the approach we have used to solve the questions.



The distance between two points on a plane is the Euclidean Distance.
If N = 2, K = 1 and the points are {2,3}, {-1, 2}.
Then the distance of the first point from the origin is sqrt((2 - 0) ^ 2 + (3 - 0) ^ 2) = sqrt(13).
The distance of the second point from the origin is sqrt((-1 - 0) ^ 2 + (2 - 0) ^ 2) = sqrt(5).
Can you solve this in O(N log K) time complexity?
1. Use a max heap (or max priority queue) to store points by distance
2. Store the first kk elements in the heap.
3.Then only add new elements that are closer than the top point in the heap while removing the top point to keep the heap at kk elements.
4.Return an array of the kk points stored in the heap



You are given ‘ARR’ = {1, 2, 2, 3, 3} and ‘K’ = 2.
The answer will {2, 3} as 2 and 3 are the elements occurring most times.
The interviewer first introduced him and then asked me to for my introduction. After that he asked 2 DS questions.



We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
Sort the array and find the target sum with 2 pointer technique.



Simply gave the interviewer, DFS based approach by visiting adjacent connected components and counting the number of islands. The interviewer was satisfied with my approach.
Only 2 coding questions were asked



create all the substring, While creating the substring i is fixed and j increases that means our substring increases by 1 character every time. after that use binary search on the answer that is the length of the substring using sliding window technique.



I had already practised it a day before. so it was easy for me to code. I simply used the heap sort algorithm to solve this problem
It was a project discussion round and multiple questions on amazon principal
Tell me about yourself.
Negative and positive things in you.
How will you resolve conflicts with your manager?
How will you resolve conflicts with your team mates?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
He asked about one of project I mentioned in my CV.
Multiple cross question on my role in the project, how can we make code less redundant. what is data base sharding. He also asked some questions on low level design.

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?