Tip 1 : Focus on time complexity of Algorithms
Tip 2 : Practice as many coding problems as you can
Tip 3 : Be calm and think before jumping into solution
Tip 1 : Be yourself don't add fancy looking tech stack
Tip 2 : Make it small should not be more than 2 pages
It was ab online coding round and the given for the round was 90 min and there were two medium level coding problems to solve



The left subtree of a node contains only nodes with keys less than or equal to the node's key.
The right subtree of a node contains only nodes with keys greater than or equal to the node's key.
Both the left and right subtrees must also be binary search trees.
Example of a BST



Consider 0-based indexing.
Consider the array 1, 2, 3, 4, 5, 6
We can Jump from index 0 to index 1
Then we jump from index 1 to index 2
Then finally make a jump of 3 to reach index N-1
There is also another path where
We can Jump from index 0 to index 1
Then we jump from index 1 to index 3
Then finally make a jump of 2 to reach index N-1
So multiple paths may exist but we need to return the minimum number of jumps in a path to end which here is 3.
It was in the afternoon. It was taken on Amazon Chime and the interviewer was not much interactive. He was SDE with 7 years of experience



1. A binary tree is a tree in which each node has at most two children.
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.



1. The array follows 0-based indexing, so you need to return 0-based indices.
2. If 'x' is not present in the array, return {-1 -1}.
3. If 'x' is only present once in the array, the first and last position of its occurrence will be the same.
Input: arr = [1, 2, 4, 4, 5], x = 4
Output: 2 3
Explanation: The given array’s 0-based indexing is as follows:
1 2 4 4 5
↓ ↓ ↓ ↓ ↓
0 1 2 3 4
So, the first occurrence of 4 is at index 2, and the last occurrence of 4 is at index 3.
2nd and third face to face round happened on the same day. This time the interviewer was very interactive and helping



If there are more than one substring with the shortest length, then find one which appears earlier in the string ‘S’ i.e. substring whose starting index is lowest.
If the given string ‘S’ = "abcba", then the possible substrings having all the characters of ‘S’ at least once and of minimum length are "abc" and "cba".
As "abc" starts with a lower index (i.e. 0, "cba" starts with index 2), we will return the string "abc" as our shortest substring that contains all characters of 'S'.



push(X, M): Pushes an element X into the Mth stack. Returns true if the element is pushed into the stack, otherwise false.
pop(M): Pops the top element from Mth Stack. Returns -1 if the stack is empty, otherwise, returns the popped element.
Type 1: for push(X, M) operation.
Type 2: for pop(M) operation.
It was hiring manager round and was taken by a senior folks. He was very cool guy. It was taken in the morning



Asked about scheduling algorithms, then he said we have to implement portal for covid vaccination, which scheduling algorithm should you use? I told him first come first serve. Then he said the vaccination is based on age group I should give first priority to 60+ then 45 to 60 and last priority to 18 to 45 people. What algorithm should we use now?
Tip 1 : Read scheduling algorithms properly
Tip 2 : Think before proposing any solution
He asked me to write one SQL query.
Given an Employee table with employeeid departmentid and salary
Department table with departmentid and DepartmentName
Write a quey to list the sum of salary paid by each department (Result should have DepartmentName and Salary columns)
Tip 1 : Practice some SQL queries
Tip 2 : Have basic knowledge about SQL commands like having and group by clauses
It was a bar raiser round. The interviewer was very interactive. It was in the morning
He asked me some situation based questions like have you ever done something extraordinary in your current org.
Tip 1 : Always use STAR technique to answer these questions
Tip 2 : A lot of cross questions will be asked so prepare yourself before giving any situation
Tell me a situation where you went extra miles in order to meet the client requirements
Tip 1 : Always use STAR technique to answer such questions
Tip 2 : Be ready for cross questions

The given formula consists of English alphabets, digits, ‘(‘ and ’)’.
The given formula is always valid.

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?