Online Test: There were 28 MCQs mostly based on stacks, queues, predict the output, Sorting, and Binary Trees and 2 coding questions.
1) Given a string convert it into a valid address by inserting a ‘.’ after www then insert a ‘.’ before com and if there are more characters after com then put a ‘/’ after com and then the rest of the characters.
Eg:
Input: wwwgooglecomr Output: www.google.com/r
Print the length of the longest decreasing subsequence.
Round 1 (Interview 1): The interviewer introduced himself and asked me to introduce myself.
Coding Questions
- Print all the pairs whose sum is equal to 0.
- He extended the question to find all the triplets with sum 0.
Round 2 (Interview 2): Coding Question
- Given n strings in ‘a/b=0.5′,’b/c=0.9’ format. Find the answer of q queries in ‘a/c’ format.
Hint: (Make a directed graph with a, b and other alphabets as vertices)
Round 3 (Interview 3):
- Tree-Based: Given a binary tree and one node is set on fire so find the time required to burn all the nodes.
- Stack Based: Given a string with ‘U’ and ‘D’. Find the number of mountains and valleys
Eg:
Input: UUDDDDUDUU Output: Mountain 1 is formed by UUDD and 1 Valley by DDUDUU
The interviewer expected me to code all the questions completely and helped in between if stuck to find the optimized approach.
Tips:
- Start coding after the interviewer is satisfied with your approach.
- First, clarify all the doubts and then give your solution.
- Dry run your code for multiple edge cases
- Try to write a clean code.
Recommended Posts:
- Amazon Interview Experience SDE-1 | Amazon-WOW 2020
- Amazon SDE-1 Interview Experience | Amazon WOW-2020
- Amazon Interview Experience for SDE-1 | Amazon-WOW 2020
- Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)
- Amazon Interview Experience | Set 241 (1.5 years experience)
- Amazon Interview Experience | Set 242 (1 Year Experience)
- Amazon Interview Experience | Set 243 (2.5 Years Experience)
- Amazon Interview Experience | Set 248 (4.8 Yrs Experience for SDE II)
- Amazon Interview Experience | Set 391 (SDE-2, 5.5 years Experience)
- Amazon Interview Experience | 401 (3+Years Experience for SDE II)
- Amazon Interview Experience (For Experience - 2.8 yrs) | SDE 1
- Amazon Interview Experience (SDE-1, 8 month experience, Refferal)
- Amazon Interview Experience | Set 180 (Telephonic Interview )
- Amazon Interview Experience | Set 249 (Telephonic Interview)
- Amazon Interview Experience (Telephonic Interview)
- Amazon Interview -SDE 1 Interview Experience
- Amazon SDE 2 Experience (3 Years Experience)
- Amazon Interview Experience | Set 287 (On-Campus)
- Amazon Interview Experience | Set 189 (For SDE-1)
- Amazon Interview Experience | Set 185 (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.


