Tip 1 : Practice writing code on a white paper.
Tip 2 : Practice thinking out loud.
Tip 3 : If you don't know the answer to something just say so. Don't waste the interviewers and your time. Chances are he/she will change the question.
Tip 1 : Have something on your CV, like project or internship to have a 15-20min discussion.
Tip 2 : Only add bonafide information and don't copy project from your friends/internet.
30 MCQs along with 2 coding(easy-medium x 2) questions to be completed in 90 minutes.
Timing: 10AM
Environment: Students from all departments were allowed to sit in the screening test. Around 350 people sat for the examination.



Where distance between two points (x1, y1) and (x2, y2) is calculated as [(x1 - x2) ^ 2] + [(y1 - y2) ^ 2].


str = "ababc"
The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome.
There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
This was the 1st f2f round. The interviewer called my name and took me to a separate room and gave me a white paper.



Input: 'arr' = [1,1,2,2,4,5,5]
Output: 4
Explanation:
Number 4 only appears once the array.
Exactly one number in the array 'arr' appears once.



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.



You are given ‘MAT’= [[1, 2],[3, 4]] and ‘K’ = 8.

Then the answer will be 7 (the sum of the red rectangle).
He asked me if I know the solution to this and I said yes, this can be solved using Kadane's algorithm. He was satisfied with my answer and didn't ask me any coding related stuffs. He asked some basic questions from resume projects and we were done.
I was told by the HR that I have been cleared for the next round and it would begin in sometime.
This was a discussion based round where the interviewer asked me an open ended question and we were discussing the approaches to solve it.
Its was a frog jumping version of Triangle Golf Tee Puzzle.
Tip 1 : Try to figure out the trick.
Tip 2 : Try to analyse and solve the problem from scratch.



You are given ‘WORDS’ = [“cat”, “mat”, “tac”]. Then the answer will be [(0, 2), (2, 0)}, because “cat” + “tac” = “cattac” which is a palindrome and “tac” + “cat” = “taccat” which is also a palindrome.
The HR again told me that I have cleared the last round and the next round will start in some time and I will be called soon. The interviewer called my name and took me to a room. We began by introducing ourselves. He asked me some basic CS fundamentals question.






• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
I asked him whether I can use extra space or not and he said no. I realized this would require graph traversal type approach with 2 pointers smartly moving and waiting for the other to complete its traversal. I have him an adhoc approach. He asked me to code it. The code was not exactly correct but somehow he was convinced that the method was right but very complex to implement in pen and paper.
This round took place the next day. We were informed that we cleared the 3rd round and this will be the last round - Bar Raiser. A very experience Amazon engineer took this round. He took my resume and asked me about the interview experience. I told him honestly. He asked me some questions related to the internships and projects I did. It was a long 30min conversation where we talked about the challenges faced and the things I learned in the process. He then asked me some theory questions from object oriented programming. I answered all of them except one but that was okay he told me.



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.

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?