##
Find if there is a pair in root to a leaf path with sum equals to root’s data
December 7, 2016

Given a binary tree, find if there is a pair in root to a leaf path such that sum of values in pair is equal to root’s data. For example, in below tree (7, 1) is a pair with sum equals to root’s data. The idea is based on hashing and tree traversal. The idea… Read More »