Overview of my resume, current role responsibilities and asked to explain internship project in brief.
1. What is the definition of tree ?
2. What are the differences between graph and tree?
3. When can you say a graph to be a tree?
4. Write a program to show whether a graph is a tree or not using adjacency matrix.
Its always good to ask questions at the end. It shows our interest towards the company.
Overview of current job responsibilities and internship project.
1. Convert a tree to a sum tree.
Example : 1 27 / \ / \ 2 3 -------> 9 13 / \ / \ / \ / \ 4 5 6 7 0 0 0 0
Always take care of all the corner cases
2. Print a pascal tree .
3. Given a 2D matrix sorted row wise and column wise . Print the matrix in sorted way. (Can be done using Min Heap).
For all the questions, complexity of the program was asked and was being asked to improve both time and space complexity.
Many questions regarding my current project, tools and technology I am working on.
1. Convert a binary tree to a sum tree . Here he had a new meaning of sum tree.
Example : 1 1 / \ / \ 2 3 -------> 2 5 / \ / \ / \ / \ 4 5 6 7 4 9 15 22
(I did it with Level Order Traversal) (Complete working code was required)
2. Given an array of integers. Find the largest 3 element. (Can be done using Max Heap in less time complexity)
Lots of questions on my current work and tools which I was using.
Why do I want to leave my current company on such a short interval of 5 months.
Why Amazon ?
What inspires you to join Amazon? Why dream company ?
1. Connect Sibling pointers. I gave a Level Order Traversal solution. He asked to do it in O(1) space complexity. I explained the approach but messed up In writing the working code for that.
2. Explain the approach of LRU cache and implement using object oriented language.
Why do you want to leave your current company in such a short interval?
Did u ask your current company to provide that type of work as u r looking in Amazon?
1. Design a system for finding the costliest element always whenever we pick up an element from a box.(concept of Max Heap)
2. A stream of data is coming. Maintain records in a page and mechanism to see previous and next page. (Concept of Doubly Linked List)
(It is always advisable to ask questions in design questions. The interviewers expect that we will be asking questions for clarification)
What is thread?
What is the meaning of memory leakage?
Followed by many OS questions but I forgot.
In every round , after each question , complexity of the algorithm was asked. Its good to ask questions to get more clarification about the question.
I want to thank the entire team of geeksforgeeks. It is a great portal and it helped me a lot in preparing for Amazon interview.
Reference – GeeksForGeeks and Cracking The Coding Interview
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
- Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)
- Amazon Interview Experience | Set 242 (1 Year Experience)
- Amazon Interview Experience | Set 391 (SDE-2, 5.5 years Experience)
- Amazon Interview Experience | 401 (3+Years Experience for SDE II)
- Amazon Interview Experience | Set 243 (2.5 Years Experience)
- Amazon Interview Experience | Set 241 (1.5 years experience)
- Amazon Interview Experience | Set 248 (4.8 Yrs Experience for SDE II)
- Amazon Interview Experience | Set 234 (For SDE-II)
- Amazon Interview Experience | Set 250
- Amazon Interview Experience | Set 432 (For SDE-2)
- Amazon Interview experience | Set 335
- Amazon Interview Experience | Set 234
- Amazon Interview Experience | Set 238 (For SDE)
- Amazon Interview Experience | Set 244 (For SDE-1)
- Amazon Interview Experience | Set 247 (For SDE 1)