Got a message from HR on Linkedin that my profile has been shortlisted for SDE-2 profile

He sent me Invite for Interview in Amazon Gurgaon Office

**Round 1 (Written Round)**

Return Nth Node from the back of the linked list

https://www.geeksforgeeks.org/nth-node-from-the-end-of-a-linked-list/

Zigzag Traversal of Tree

https://www.geeksforgeeks.org/zigzag-tree-traversal/

Max length path between any two points in the given N*M matrix such that all elements in that path are in increasing order

https://www.geeksforgeeks.org/find-the-longest-path-in-a-matrix-with-given-constraints/

**Round 2 (DS/Algo Round)**

Find the node in the linked list having a cycle where the loop starts.

https://www.geeksforgeeks.org/find-first-node-of-loop-in-a-linked-list/

I gave him well known slow and fast pointer solution instantly.

Then he told me to do the calculation and derive the formula why the above solution works.

I did the same.

Find two nodes where the sum is equal to a given sum in a BST.

https://www.geeksforgeeks.org/find-a-pair-with-given-sum-in-bst/

I didn’t know the stack solution so I thought in other direction.

I asked him can I modify the tree to which he replied YES.

I told him that we can convert the BST into DLL and then traverse the DLL taking two pointers one from each side and get the nodes with the given sum.

Since the time complexity was O(n) in this case so he got satisfied.

**Round 3( Design Round)**

Asked me about my projects in the current company.

Asked me to design High-level design for Latency Management System.

Asked me to design Low-level design for Library Management System.

Since I didn’t do well in design round, they considered me for SDE-1.

**Round 4 (DS/Algo Round)**

Edit Distance Problem of DP

https://www.geeksforgeeks.org/edit-distance-dp-5/

Water Trapping Problem

https://www.geeksforgeeks.org/trapping-rain-water/

Find maximum element in the sliding window of k elements in an array

https://www.geeksforgeeks.org/sliding-window-maximum-maximum-of-all-subarrays-of-size-k/

Then I was told by the HR to fly back to Chennai next week for further rounds. He arranged everything from flight tickets to accommodation.

**Round 5(Managerial Round)**

Discussed my current profile and projects in my current company.

Why I want to leave my current company.

Long Discussion about my projects.

One of my projects was to develop a notification service.

He found it of his interest and asked for a detailed explanation. He asked the difference between a service and program.

What is thrashing?

My 3 most challenging tasks I have worked on.

My 3 most boring tasks I have worked on.

My 3 strengths.

My 3 weaknesses.

Do you have ever faced a situation in which you have to stretch yourself?

As a child how did you see your future?

What is your favourite data structure and why?

What is O(n) and what’s its use?

Will you be able to relocate to Chennai?/ Do you have issues with relocation?

There was a lot of cross-questioning and he noted everything whatever I was saying.

**Round 6(Bar raiser)**

Discussed my current profile and projects in my current company.

Do you have issues with relocation? He told me a lot of candidates come here and then try to relocate back to other locations.

He took a deep dive into one of my projects and asked me questions like

What challenges you faced while doing this project and how you resolved them.

Why do you want to join Amazon?

In the end, he gave me a simple question to solve.

There is an array of integers, replace every number with its next greater element.

https://www.geeksforgeeks.org/replace-every-element-with-the-greatest-on-right-side/

Verdict: Got selected 🙂

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to [email protected] 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.