Skip to main content

Command Palette

Search for a command to run...

Amazon Interview Experience for Full Time SDE

On campus 2018

Updated
4 min readView as Markdown
Amazon Interview Experience for Full Time SDE
P

Growing the best engineers by helping them develop their skills and get placed in amazing companies

Amazon visited my campus for Full-Time Software Development Engineer.

Coding Test (Hackerearth):

  1. Around 20 MCQs based on OS, DBMS, Networks, and CPP
  2. Two coding questions

Ques 1) Given a string containing only a, b and c. You have to split the string into two parts. Append the left part to the right part and keep removing the characters if they are same at the joint. Eg.: let s = "abacacbaa" left = "abac", right = "acbaaa" ans = "acac"

Ques 2) You are given two arrays, A and B. Ai contains the number of candies of type i, and Bi contains the priority of the ith candy. You can’t eat a candy of lower priority before a candy of higher priority, and only one type of candy can be eaten in a day, and the maximum number of candies that can be eaten in a day is given by ‘k’. You are given a list of queries containing the candy type and the day. For each query, you have to tell whether or not the given type of candy can be eaten on the given day. Print “yes” if possible otherwise print “no”.

Interview:

Round 1 (35-40 mins):

I was asked to introduce myself, then given 5 minutes time to explain my intern project, and for the rest of the time, the interviewer asked me coding questions.

Ques 1) You are given a string array containing the list of cities, and an API ‘isConnected(string A, string B)’. The API tells whether cities A and B are directly connected (the path is directed) or not. You are given two cities as input. You have to write a function which will tell whether or not there exists a path between the given cities. Hint: Build an adjacency list/adjacency matrix using the API, and find out all connected components. If both the given cities lie in the same component, there exists a path.

Ques 2) Given a BST in which two nodes are swapped (values), identify those nodes.

Round 2 (45-50 mins):

Ques 1) Explain distributed in-memory computation. (This was based on Big Data project mentioned in my resume).

Ques 2) You are given a string containing [, ], {, }, (, ) and X. X can be any one of [, ], {, }, ( and ). You have to tell whether or not the given string can be converted into a balanced parentheses string by replacing X with anyone among [, ], {, }, ( and ). Hint: Use backtracking

Ques 3) Given the root of a balanced binary search tree and a number N, tell whether or not there exist two nodes whose sum of values equals N. Space complexity used should be less than O(n).

Round 3 (40-45 mins):

Ques 1) Split an array of integers into two subsets of equal average. Return both the subsets.

Ques 2) Given a 2-D array filled with 1’s and 0’s. A group of ones that can be traversed completely from any 1’s of that group is called an island. You have to count the number of islands in the given matrix. For a given index (i, j), you can go to (i+1, j), (i-1, j), (i, j-1), (i, j+1), (i-1, j-1), (i+1, j+1), (i+1, j-1) and (i-1, j+1). Hint: Use DFS

Ques 3) Tell the difference between HTTP and HTTPS.

Round 4 (40-45 mins):

This round was both technical and HR.

Ques 1) I had mentioned DBMS and OS in my resume. Based on that, I was asked to design a database to calculate the ratings of movies like IMDB. He then asked me to make this scalable for a large database. How can I find the reviews of the latest movies (movies released after a certain date)?

Ques 2) Given an array, rearrange the array elements such that it is increasing for the first half and decreasing for the second half.

Then, asked me a few HR questions like why do you want to join us, why should we hire you, why did you opt for software field (my branch is Electrical) etc.

Finally, 5 students were selected from my college and I was one of them.

Tip: Prepare yourself well for writing code on paper or board. They are going to ask to write a clean code on paper for every question. Just telling the approach isn’t enough. Try to keep the interview as interactive as possible, discuss your approach. If you get stuck, you might ask for some hint. Though one of the interviewers denied (told me that that would reveal the entire solution), but he asked me whether I wanted to move on to another question.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies. Learn more at Placewit . Follow us on Instagram and Facebook for daily learning.

Interview Experiences

Part 20 of 26

Read interview experiences to keep in touch with commonly asked interview questions in top tech companies!

Up next

Amazon Interview Experience for SDE-1

On-Campus 2019