# Amazon Interview Experience | Set 390 (On-Campus)

• Difficulty Level : Easy
• Last Updated : 11 Jul, 2019

Amazon visited our campus in August 2017. There were 5 rounds – Aptitude test and 4 Technical rounds.

The aptitude test was an online test hosted in HackerEarth platform. It consisted of 20 MCQ’s of 1 mark each and two coding questions of 100 marks each. Total time was 90 minutes. The MCQ’s were from subjects such as Data Structures, Networks, Operating systems and a few shell command questions. The HR said that there was a separate cutoff for the MCQ’s. The two coding questions were

1. Given a string, find the longest sub-string such that the sub-string has unique letters.
2. Given a matrix, find the sum of the sub-matrix between two given points.

The results were announced the next day. There were 4 technical rounds:

All rounds had similar questions such as “Tell me about yourself”, “What do you know about Amazon”, “Why amazon”, “Do you have something you want to ask me” , “Strengths and weaknesses” and few other HR questions. The main focus of each round were the problems. First we have to solve the problem and explain out idea to the interviewer, and he may suggest modifications and improvements. After that we have write the code for the same (on parer). While writing the code take care to not to make too many corrections, start writing the code only after getting a clear idea of what to write.

Round 1:

1. Given a binary search tree, find the k th smallest element.
2. Given a matrix which is sorted both row wise and column wise, search for an element.

Round 2:

1. Given a linked list, find and remove all the loops.
2. Construct a minimum spanning tree from a given weighted graph. While solving this I made use of certain “set” functions. As I didn’t know syntax of these operations in C++, wherever I had to make use of set functions I wrote a “sudo” function call. So after writing the code for the question, she asked me to implement the set functions that I had used.

Round 3:

He didn’t give me any problems. The questions were mostly based on an SQL based project that I had done, and on my internship.

Round 4:

1. Given a number, find the next higher number which is a palindrome.

Example: if given number is 99 next highest palindromic number is 101, if given number is 72 next highest palindromic number is 77.