Tip 1 : Focus on more efficient approaches for each problem
Tip 2 : Study the basics in great detail
Tip 3 : Keep practicing as much as you can
Tip 1 : Have AWS or related skills on the resume
Tip 2 : Have proper knowledge about everything mentioned in your resume
The test was scheduled at 9 am on Amazon's personal test platform.
The test consisted of:
7 Debugging Questions
2 Coding Questions
10 Mental Ability MCQs
HR Questions based on Amazon's Leadership Principles
The debugging questions were easy where we just had to select the option in which line the code snippet would be giving error.
The HR questions were based on 16 leadership principles of amazon such as dive deep, think big



Note that the level order traversal must not contain any null values, simply return the tree in level order.



Two nodes are said to be adjacent to each other if they are directly connected to each other. This means that if a node is taken as part of the sum, then none of its children can be considered for the same and vice versa.
For the given binary tree

Nodes used in consideration for maximum sum such that no two of them are adjacent are highlighted. Maximum sum of nodes = 1 + 1 + 1 + 4 + 5 = 12.
This was the interview round which lasted for about 45 minutes.
First the interviewer asked me to introduce myself and later asked 2 coding questions. I was asked to share my screen through Amazon chime on the link shared by interviewer.
The interviewer was very chill and he made me quite comfortable before starting the interview.






Here, sorted paths mean that the expected output should be in alphabetical order.
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1
Expected Output:
DDRDRR DRDDRR
i.e. Path-1: DDRDRR and Path-2: DRDDRR
The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
I was already prepared for this type of problem so I followed the approach mentioned in this article.to store the paths in a vector of strings
Link: https://www.codingninjas.com/codestudio/problem-details/rat-in-a-maze_1215030
Then for finding the efficient path I iterated through each element of the vector and counted the change from 'D' to 'R' and stored it into a temporary variable and compared with min variable initialized with -INT_MAX
If the current count is less than min count then min count = current count and the path is stored in a string variable
Return the string variable after all elements of vector has been iterated.
Further there was a discussion on time and space complexity.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?