Tip 1 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 2 : Deep understanding of Amazon Leadership principles is a must.
Tip 1 : Resume should be short and concise
Tip 2 : Add side projects and learnings
Timing - Flexible, you can take up at any time
Environment was pretty good as it was on HackerRank



You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For the given binary tree

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
The idea is to traverse the tree starting from the root. If any of the given keys (n1 and n2) matches with the root, then the root is LCA (assuming that both keys are present). If the root doesn’t match with any of the keys, we recur for the left and right subtree. The node which has one key present in its left subtree and the other key present in the right subtree is the LCA. If both keys lie in the left subtree, then the left subtree has LCA also, otherwise, LCA lies in the right subtree.



A cell in 2D matrix can be connected to 8 neighbours. So, unlike standard DFS(), where we recursively call for all adjacent vertices, here we can recursively call for 8 neighbours only. We keep track of the visited 1s so that they are not visited again.
One coding question related to Binary Trees. I found it to be a bit on the harder side.
Timing - 12:00 PM


i) Nodes considered for the sum should be from parent to child.
ii) For a particular way, you can only consider nodes having the common path.
iii) Two ways are different from each other if they have an unequal number of nodes (for making sum equal to k) or at least one node is different between both the ways.

For the binary tree shown in the figure, the possible ways/paths are [8, 6, -4], [6, -3, 7], and [1, 9] for a sum of nodes equal to 10.
System Design round
Timing : Afternoon 5:00 PM
Design a vending machine backend and handle the different payment methods like Cash, Card, UPI, etc.
Tip 1 : Practice System Design thoroughly.
Tip 2 : DB design is a must
Tip 3 : You can follow the System Design guided path on CodeStudio along with Gaurav Sen's videos. It's indeed a great resource.

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?