**Company Name**: Amazon

**Job Role: SDE**

**Years of Experience Required: **Fresher (0 Yrs.)

**Drive**: Off-Campus

## Preparation for Amazon

### Preparation

**Topics: **Data Structures and Algorithms

**Duration: **3-5 months

**Source of Preparation: **Codechef, Leetcode, Striver’s SDE sheet.

[*BONUS]:*

*Check Striver’s SDE Sheet for Interview Preparation.**Check the ultimate resume-building guide for coding interviews*.*Blind 75 Leetcode*

### Amazon Interview Rounds

### Interview Rounds

**Round 1 was a coding test where 2 coding questions were given.**

- Sort an array of 0’s, 1’s, and 2’s: Given an array consisting of only 0s, 1s and 2s. Write a program to in-place sort the array without using inbuilt sort functions.
- Add two Linked List: Given the
**heads**of two non-empty linked lists representing two non-negative integers. The digits are stored in**reverse order**, and each of their nodes contains a single digit. Add the two numbers and return the**sum**as a linked list.

**Round 2:** Technical Interview

- Allocate Minimum Number of Pages‘
- Vertical Order traversal of a binary tree.: Write a program for Vertical Order Traversal order of a Binary Tree.

**Round 3:** Technical Interview

- Rotten Oranges: You will be given an
**m x n**grid, where each cell has the following values :- 2 – represents a rotten orange
- 1 – represents a Fresh orange
- 0 – represents an Empty Cell

Every minute, if a Fresh Orange is adjacent to a Rotten Orange in 4-direction ( upward, downwards, right, and left ) it becomes Rotten. Return the minimum number of minutes required such that none of the cells has a Fresh Orange. If it’s not possible, return**-1.**

- Rod Cutting problem Dp: We are given a rod of size ‘N’. It can be cut into pieces. Each length of a piece has a particular price given by the price array. Our task is to find the maximum revenue that can be generated by selling the rod after cutting( if required) into pieces.

**Round 4:**Technical + Managerial

- He asked many situation-based questions
- Asked questions about my internships and then followed by a DSA question
- Serialize And Deserialize a Binary Tree: Design an algorithm to serialize and deserialize a binary tree. There is no restriction on how your serialization/deserialization algorithm should work. You just need to ensure that a binary tree can be serialized to a string and this string can be deserialized to the original tree structure.

**Verdict:** Selected