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 : Must verify your CV from your seniors/batchmates.
Tip 2 : Include all the projects, intern work or hall activities or anything you have done on your own which is related to or interest of company. If you know any back-end/front-end (javascript, php, mysql etc) language do mention. I think the cv shortlist was completely based on previous work and technical skills related to Web Development/Design mentioned in the CV.
Tip 3 : Focus on skills, projects and experiences more.
I had one interview for approx. an hour, it includes both Technical and HR round, well mostly technical. Interview starts with tell me something about yourself. Asked in detailed about algorithms/web based projects mentioned in CV, make sure that whatever you have written you have complete knowledge about it. Asked to code few basic algorithms questions. Do mention about small project if you have done related to web development.
If interviewer says if you want to ask any question, its always better to ask one or two question.
Introduce yourself.
Prepare tell me something about yourself way before your placement starts, a month or so. Write it down on a piece of paper, keep it to less than 120 sec, 90-100 sec is good.
A basic format would be like, your introduction, schooling (doesn't matter but if you have something good to say about), give an overview of your project/work experience mentioned in your CV.
You should cover all the necessary and important parts written in your cv in this question. If something interest the interviewer your interview can start from those topic you mentioned.
Just make sure whatever you have written in your CV, you have full knowledge of it.
What is a BST?
Binary Search Tree is a node-based binary tree data structure which has the following properties:
The left subtree of a node contains only nodes with keys lesser than the node’s key.
The right subtree of a node contains only nodes with keys greater than the node’s key.
The left and right subtree each must also be a binary search tree.



A binary search tree is a binary tree data structure, with the following properties :
a. The left subtree of any node contains nodes with a value less than the node’s value.
b. The right subtree of any node contains nodes with a value equal to or greater than the node’s value.
c. Right, and left subtrees are also binary search trees.
It is guaranteed that,
d. All nodes in the given tree are distinct positive integers.
e. The given BST does not contain any node with a given integer value.


A new key is always inserted at the leaf. We start searching a key from the root until we hit a leaf node. Once a leaf node is found, the new node is added as a child of the leaf node.
Pseudocode:
1. If tree is empty (no root), create a node with key k as root; return .
2. Set CurrNode = RootNode.
3. If k == CurrNode.key, return since the node is already present.
4. If k< CurrNode.key ... /* key must go in left subtree */
If CurrNode.left == NULL, create a node holding k as left child of CurrNode; return.
else set CurrNode = CurrNode.left, and go to 3.
5. else ... /* key must go in right subtree */
If CurrNode.right == NULL, create a node holding k as left child of CurrNode; return.
else set CurrNode = CurrNode.right, and go to 3.



• 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.
For the given BST, if we want to delete the node with data 5 :

The modified BST will be:

Please notice that another valid answer is:

1. The node which we want to delete will always be present in the given tree.
2. If after deletion the tree becomes empty, print -1.
Three cases arise in deleting a node :
1.Node to be deleted is the leaf: Simply remove it from the tree.
2. Node to be deleted has only one child: Copy the child to the node and delete the child node.
3.Node to be deleted has two children: Find inorder successor of the node. Copy contents of the inorder successor to the node and delete the inorder successor.
Pseudocode :
if node is null ->
return the node (either we were given an empty tree or we've iterated through the tree and didn't find the value, in which case we return the original tree)
if current node is less than the value we're looking for ->
recursively call function on right side
if current node is great than the value ->
recursively call function on left side
otherwise, we've found the node we want to delete
-> if the node has no children, return null
-> if the node has one child, return the non-null subtree
-> otherwise:
-> find the min value in the right subtree
-> set the current node's value to the found min value
-> delete the now duplicated node
-> return the current node




Algorithm :
1. Consider l1 as a node on the 1st list and l2 as the corresponding node on 2nd list.
2. Build the 2nd list by creating a new node for each node in 1st list. While doing so, insert each new node after it's corresponding node in the 1st list.
3. The new head is the 2nd node as that was the first inserted node.
4. Fix the random pointers in the 2nd list: (Remember that l1->next is actually l2) l2->random will be the node in 2nd list that corresponds l1->random, which is next node of l1->random.
5. Separate the combined list into 2: Splice out nodes that are part of second list.
6. Return the new head that we saved in step 2.
Time Complexity : O(N)
Auxiliary Space : O(1)

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