Solution to find a sum k from root till a leaf node in a binary tree