Remove all nodes in a binary tree which don’t lie in path

-*+In previous posts we learned how to print paths with given sum and print all paths in binary search tree. Today’s problem is to delete all nodes which don’t lie on paths with given sum. This problem involves two subproblems, one is to find all paths of given sum and second is to remove nodes from tree. Formally … Continue reading Remove all nodes in a binary tree which don’t lie in path