Skip to content
Related Articles

Related Articles

Improve Article

Amazon Interview Experience | SDE-1 On-Campus

  • Difficulty Level : Hard
  • Last Updated : 09 Aug, 2019

Round 1:

There were 2 coding questions 28 mcq.
Ques1: find inversion count
Ques2: find the longest common subsequence(LCS)
MCQs were related to coding only.
The platform for this round was ‘mettl’. Don’t go for recursive codes on this platform.

Round 2:

There were 2 coding questions in this round.

Ques1: Two numbers ‘a’ and ‘b’ are given. Find the count of numbers which are divisible by both ‘a’ and ‘b’ and are less than 10^16.

Ques2: People of Tribe A are living in a particular region. Then tribe B people shifted to the same region as of tribe A. People of tribe B doesn’t like to see tribe A people. A person from tribe B wants to travel from the train which covers ‘n’ stations. You have been provided with an array of size ‘n’ in which each element represent the number of tribe A people who board the train at that station. Find the maximum number of stations the person can cover without seeing more than ‘k’ number of people of tribe A. Also find the maximum people the person can see while covering those number of stations. (Person can start and end at any station).
Hint: Basically the ques was to find the longest subarray whose sum of the elements doesn’t exceed k (With some variation)

Round 3:

There were 2 coding questions in this round.

We are provided with a number ‘n’ which denotes the number of opening and closing parenthesis. Print all the valid combination of parenthesis.
Then this ques was modified to find the total number of valid combinations possible for a given ‘n’.
Optimized Solution: Time complexity: O(n^2) and Space Complexity: O(n^2)
Then he asked me to optimize space
Again optimized: Time complexity: O(n^2) and  Space Complexity: O(2n)=O(n)

We have a telescope and we can see an infinite number of stars(one by one). We have been provided with a method() that will calculate the distance of each star from us. So at any point print the closest ‘k’ stars which we can see.
Solution: use heap(priority_queue)

Round 4:

There were 2 coding questions and technical questions

Fill two instances of all numbers from 1 to n in a specific way

Technical questions related to OS, OOPS, Computer Networks

There are infinite number of people visiting the Amazon website. A person can visit the website several time. A stream of number are coming that represent id of the person visiting the website and a fixed number ‘k’ is provided. At any particular time find ‘k’ people who have most visited our website.
Solution: use map and heap(priority_queue)

Round 5: (Bar-raiser round)

Tell me something about yourself. Then questions on each term I was using.

Coding ques1:
Given an expression find whether it is valid or not.
This was implementation based ques and whether I am covering all the corner testcases or not.

This was the last round. 7 people were selected from my college.

Duration of each round was 60 to 90 minutes.
Be prepared to write code for each and every approach you are telling.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, AmazonGoogle and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :