Try to do Data Structures and Algorithms-based questions, and first attempt them yourself before referring to the solution. Also, try to solve them as quickly as you can. Additionally, prepare for theoretical subjects like Operating Systems, Database Management Systems, etc., which I studied using Coding Ninjas' subjective notes; they are very accurate and up-to-date.
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.






Below is the example showing the input tree and its sum tree.








1) If the left subtree exists it should contain only nodes with values less than the current node's value.
2) If the right subtree exists it should contain only nodes with values greater than the current node's value.
3) Both the left and right subtrees should also be Binary Search Tree.

For the above binary tree, the BST with the maximum possible sum is marked with RED colour, the sum of this BST is equal to 6.



A binary search tree, also called an ordered or sorted binary tree, is a rooted binary tree whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.
A balanced binary search tree is a tree in which each node has either 0 or 2 children.
For Example, the root node is given as follows :
‘ROOT’ = 5 2 6 -1 -1 -1 -1 and ‘target’ = 8, The answer will be true since the sum of both leaf nodes is equal to 8.
I first tried to convert the tree to a doubly linked list, but the interviewer asked me to do it without conversion. Then, I created a function to traverse the tree in inorder and reverse inorder traversal, and the interviewer was satisfied with this approach.



If the root node is less than low, then return the right subtree, and if the root node is greater than max, then return the left subtree.

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?