Tip 1: Solve at least 500 medium-level questions; it will help you crack interviews.
Tip 2: Do at least two good projects to help shortlist your resume.
Tip 1: Have some Eye-catching projects.
Tip 2: Mention the coding profile links and achievements, if any.
It was Online Assessment round.
• 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.
In the case of two closest sums, print the smallest sum.
It was in afternoon.1 hour interview
• 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.
'P' = 1, 'Q' = 3
tree = 2 1 4 -1 -1 3 -1 -1 -1,
The BST corresponding will be-
Here, we can clearly see that LCA of node 1 and node 3 is 2.
It was a kind of discussion round with some technical questions. I was grilled hard on projects and other skills mentioned on my resume.
If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?