Tip 1 : Have at least one project in resume
Tip 2 : resume should be one page only strictly
Tip 3 : Put some achievements like you got a good rank in a coding contest to help you stand out.
Tip 1:Make your resume 1 page
Tip 2:Mention at least one project in your resume.
It was at 10 am sharp in the morning. There were two parts to the online assessment round. The first part is the coding round(two questions were asked). And 2nd part is the work simulation round.



1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
The idea is to get the total sum of the array first. Then Iterate through the array and keep updating the left sum, which is initialized as zero. In the loop, we can get the correct sum by subtracting the elements individually.



If two or more such subarrays exist, return any subarray.
An efficient solution is while traversing the array, storing sum so far in currsum. Also, maintain the count of different values of currsum in a map. If the value of currsum is equal to the desired sum at any instance increment count of subarrays by one.
The value of currsum exceeds the desired sum by currsum – sum. If this value is removed from currsum then the desired sum can be obtained. From the map, find the number of subarrays previously found having sum equal to currsum-sum. Excluding all those subarrays from the current subarray, gives new subarrays having the desired sum.
So increase count by the number of such subarrays. Note that when currsum is equal to the desired sum then also check the number of subarrays previously having a sum equal to 0. Excluding those subarrays from the current subarray gives new subarrays having the desired sum. Increase the count by the number of subarrays having sum 0 in that case.
It was in the morning time at 9 am.
The interviewer was an SDE-2; he introduced himself and asked the same of me.
Then asked me about my internship and then directly jumped to coding questions.



For the given binary tree

The level order traversal will be {1,2,3,4,5,6,7}.
For each node, first, the node is visited and then it’s child nodes are put in a FIFO queue. Then again the first node is popped out and then it’s child nodes are put in a FIFO queue and repeat until queue becomes empty.



If the input string is ‘str’ = ”aazbbby”, then your output will be “azby”.
Note that we are just removing adjacent duplicates.
Basic Approach is to create a Stack that store the
Character and its continuous repetition number This is
done using pair Further we check at each
iteration, whether the character matches the top of stack
if it does then check for number of repetitions
else add to top of stack with count 1
It was at 12 pm on the same day at Amazon chime platform.
Interviewer seems to be an experienced one.
He introduced himself then asked the same from me.
Started with some amazon principle question.
And then asked 2 coding problems.
Tell me a time when you have taken responsibility for a project and given good results.
Tell me a time you have worked under pressure and given an exceptional result.



In the given linked list, there is a cycle, hence we return true.

He was basically asking for this specific algorithm flyod warshell algo
Follow the steps below to solve the problem:
Traverse linked list using two pointers.
Move one pointer(slow_p) by one and another pointer(fast_p) by two.
If these pointers meet at the same node then there is a loop. If pointers do not meet then the linked list doesn’t have a loop.
It was at 4 pm on the same day at Amazon chime platform.
Interviewer introduced himself then asked the same from me.
Started with some amazon principle question.
And then asked 2 coding problems.



Follow the below steps to implement the idea:
Create jumps[] array from left to right such that jumps[i] indicate the minimum number of jumps needed to reach arr[i] from arr[0].
To fill the jumps array run a nested loop inner loop counter is j and the outer loop count is i.
Outer loop from 1 to n-1 and inner loop from 0 to i.
If i is less than j + arr[j] then set jumps[i] to minimum of jumps[i] and jumps[j] + 1. initially set jump[i] to INT MAX
Return jumps[n-1].



class BinaryTreeNode {
int data; // Value of the node.
BinaryTreeNode *left; // Pointer to left child node.
BinaryTreeNode *right; // Pointer to right child node.
BinaryTreeNode *next; // Pointer to next right node at same level.
}
Consider the figure shown below. The left part represents the initial binary tree and right part represents the binary tree after connecting adjacent nodes at the same level.

In the tree shown in the picture above -:
The ‘next’ pointer of the node having value 2 is connected to the node having value 3.
The ‘next’ pointer of the node having value 4 is connected to the node having value 5.
The ‘next’ pointer of the node having value 5 is connected to the node having value 6.
The ‘next’ pointer of nodes having value 1, 3, 6 will have a value NULL as there are no next right nodes in their cases.
1. The structure of the ‘Node’ of a binary tree is already defined. You should not change it.
2. The root of the binary tree is known to you.
3. There is at least one node in the given binary tree.
4. You may only use constant extra space.
Not able to optimize the approach.
we traversed the nodes in pre-order fashion. Instead of traversing in Pre Order fashion (root, left, right), if we traverse the nextRight node before the left and right children (root, nextRight, left), then we can make sure that all nodes at level i have the nextRight set, before the level i+1 nodes. Let us consider the following example (same example as previous post). Method 2 fails for right child of node 4. In this method, we make sure that all nodes at the 4’s level (level 2) have nextRight set, before we try to set the nextRight of 9. So when we set the nextRight of 9, we search for a nonleaf node on right side of node 4 (getNextRight() does this for us).

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?