Tip 1 : Be consistent in what you are doing
Tip 2 : Practice more and more coding problems
Tip 3 : Give mock interviews
Tip 1 : Mention only those topics which you know very well
Tip 2 : Mention projects



The distance is calculated as |i1 – i2| + |j1 – j2|, where i1, j1 are the coordinates of the current cell and i2, j2 are the coordinates of the nearest cell having value 1.
You can only move in four directions which are : Up, Down, Left and Right.
If N = 3, M = 4
and mat[ ][ ] = { 0, 0, 0, 1,
0, 0, 1, 1,
0, 1, 1, 0 }
then the output matrix will be
3 2 1 0
2 1 0 0
1 0 0 1
he idea is to load the i and j coordinates of each ‘1′ in the Matrix into a Queue and then traverse all the “0” Matrix elements and compare the distance between all the 1’s from the Queue to get a minimum distance



We have to follow the step:
Find the LCA of the given two nodes
Store the path of two-node from LCA in strings S1 and S2 that will store ‘l’ if we have to take a left turn in the path starting from LCA to that node and ‘r’ if we take a right turn in the path starting from LCA.
Reverse one of the strings and concatenate both strings.
Count the number of time characters in our resultant string not equal to its adjacent character.



Binary Search Tree is a node-based binary tree data structure that has the following properties:
1. The left subtree of a node contains only nodes with keys lesser than the node’s key.
2. The right subtree of a node contains only nodes with keys greater than the node’s key.
3. The left and right subtree each must also be a binary search tree.
A Binary Heap is a Binary Tree with the following property:
1. It’s a complete tree (all levels are filled except possibly the last level and the last level has all keys as left as possible). This property of Binary Heap makes them suitable to be stored in an array.
A Binary Heap is either Min Heap or Max Heap. In a Min Binary Heap, the key at the root must be minimum among all keys present in Binary Heap. The same property must be recursively true for all nodes in Binary Tree. Max Binary Heap is similar to Min Heap.
Given:- BST’s ‘ROOT’ = 4 2 6 -1 -1 -1 -1
Then the min-heap in pre-order fashion would be 2 4 6.
Create an array arr[] of size n, where n is the number of nodes in the given BST.
Perform the inorder traversal of the BST and copy the node values in the arr[] in sorted
order.
Now perform the postorder traversal of the tree.
While traversing the root during the postorder traversal, one by one copy the values from the array arr[] to the nodes.
It was technical interview



I used addition and subtraction technique to solve this, then we discussed time and space complexity for this



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Balanced parentheses are to check for a given string that contains parentheses (or brackets), should have equal opening and closing count as well as positionally well structured. For the context of this problem, we will use balanced parentheses as – ‘()’, ‘[]’, ‘{}’ – i.e given string can have any combination of these brackets.
Please note that before attempting the problem, it’s good to clarify if the string will just contain the bracket characters or any numbers, etc (as this might change the logic a bit)



Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.
Factorial is one of the most commonly asked questions in almost all interviews (including the developer interviews)
For developer interviews, more focus is on programming concepts like dynamic programming, recursion, etc, whereas from the Software Development Engineer in Test perspective, it’s important to handle the edge scenarios like max values, min values, negative values, etc and approach/efficiency are important but become secondary.
It was HR round
Tell me about yourself.
Tip 1: Be honest
Tip 2: Be confident
Tip 3: Mention only those things that you have done


You must perform the merge operation in place and must not allocate any extra space to merge the two arrays.
When ‘N’ = 4, ‘A’ = {1, 4, 5, 7} and ‘M’ = 3, ‘B’ = {2, 3, 6}.
We can merge these two arrays into {1, 2, 3, 4, 5, 6, 7} (The elements of ‘A’ are {1, 2, 3, 4} ).
Hence, the answer is {1, 2, 3, 4, 5, 6, 7}.
Tip 1: Please tell them naive solution first
Tip 2: Then move in optimised solution
Tell me the angle between minute's stick and hour stick of 5:16pm in watch
Tip 1: First calculate the angle of 1 minute
Tip 2: then calculate the angle of hour stick with one minute
Tell me about your projects
Tip 1: Mention only those projects which you have done
Tip 2: Be confident
Tip 3: Explain in details
When can you join the company
Tip 1: Tell them that I can join from tomorrow

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?