Amazon Interview Experience | SDE-1 On-Campus
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.
Ques1:
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)
Ques2:
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
Ques1:
Fill two instances of all numbers from 1 to n in a specific way
Technical questions related to OS, OOPS, Computer Networks
Ques2:
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.
Recommended Posts:
- Amazon Interview Experience | Set 281 (for SDE1)
- Amazon Interview Experience | Set 188 (For SDE1)
- Amazon Interview Experience | Set 262 (For SDE1)
- Amazon interview Experience | Set 141 (For SDE1)
- Amazon Interview Experience | 198 (For SDE1)
- Amazon Interview Experience | Set 185 (For SDE1)
- Amazon Interview Experience | Set 153 (For SDE1)
- Amazon Interview Experience | Set 258 (For SDE1)
- Amazon Interview Experience SDE1
- Amazon Interview Experience | Set 261 (For SDE1)
- Amazon Interview Experience | Set 186 (For SDE1)
- Amazon Interview Experience | Set 187 (For SDE1)
- Amazon Interview Experience SDE1
- Amazon Interview Experience | Set 291 (On-Campus for SDE1)
- Amazon Interview Experience | Set 213 (Off-Campus for SDE1)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



