Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Technical Interview round with 2 DSA based questions.



• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
1. All the elements of the Binary Search Tree are unique.
2. You can’t use the same node value/element of BST twice.
tree: 8 5 10 2 6 -1 -1 -1 -1 -1 7 -1 -1
'K' = 13,

The nodes with values 8 and 5 as shown in the above figure gives sum equal to the given target 13.
Therefore, the output will be “true” i.e it is possible to find a pair in the given BST having sum equal to ‘K’.
This problem can be solved using hashing. The idea is to traverse the tree in an inorder fashion and insert every node’s value into a set. Also check if, for any node, the difference between the given sum and node’s value is found in the set, then the pair with the given sum exists in the tree.
Time Complexity : O(n).



Input: Consider the following Binary Tree:
Output:
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]
This problem can be solved using two stacks.
Assume the two stacks are current : current level and next level. We would also need a variable to keep track of the current level order(whether it is left to right or right to left). We pop from the current level stack and print the nodes value. Whenever the current level order is from left to right, push the nodes left child, then its right child to the stack next level.
Since a stack is a LIFO(Last-In-First_out) structure, next time when nodes are popped off nextlevel, it will be in the reverse order. On the other hand, when the current level order is from right to left, we would push the nodes right child first, then its left child. Finally, do-not forget to swap those two stacks at the end of each level(i.e., when current level is empty).
Technical round with questions on OS and DSA.
Print "Hello" and "world" multiple times using two threads in java.
Follow up questions :
-- Why sleep() cannot be used?
– Why have you used synchronized keyword?
– How will a deadlock occur in this program?
– What will be the solution for breaking the deadlock?
public class ThreadSeq
{
Object hello = new Object();
Object world = new Object();
public static void main(String[] args) throws InterruptedException
{
for(int i=0; i<6;i++)
{
Runnable helloTask = new Runnable()
{
@Override
public void run()
{
new ThreadSeq().printHello();
}
};
Runnable worldTask = new Runnable()
{
@Override
public void run()
{
new ThreadSeq().printWorld();
}
};
Thread t1 = new Thread(helloTask);
Thread t2 = new Thread(worldTask);
t1.start();
t1.join();
t2.start();
t2.join();
}
}
public void printHello()
{
synchronized (hello)
{
System.out.println("Hello");
}
}
public void printWorld()
{
synchronized (world)
{
System.out.println("World");
}
}
}


The recursive approach would be to traverse the tree T in preorder fashion. For every visited node in the traversal, see if the subtree rooted with this node is identical to S.
Time worst-case complexity is O(mn) where m and n are number of nodes in given two trees.
Auxiliary space : O(n)
The above approach can be optimised to O(n) time complexity. The idea is based on the fact that inorder and preorder/postorder uniquely identify a binary tree. Tree S is a subtree of T if both inorder and preorder traversals of S arew substrings of inorder and preorder traversals of T respectively.
Steps :
1) Find inorder and preorder traversals of T, store them in two auxiliary arrays inT[] and preT[].
2) Find inorder and preorder traversals of S, store them in two auxiliary arrays inS[] and preS[].
3) If inS[] is a subarray of inT[] and preS[] is a subarray preT[], then S is a subtree of T. Else not.
HR round with typical behavioral problems.
1. Tell me something about yourself?
2. How were the interviews?
3. How were the interview questions?
4. What are the demerits in SnapDeal?
5. Rank Snap Deal? Suggestions? Questions?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.

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