Solution to the printall paths in a binary tree for a given sum value