Ниже приведен собеседование.
Вам предоставляется двоичное дерево (не обязательно BST), в котором каждый node содержит значение. Создайте алгоритм для печати всех путей, которые суммируются до этого значения. Обратите внимание, что это может быть любой путь в дереве - ему не нужно начинать в корне.
Хотя я могу найти все пути в дереве, которые начинаются с корня, имеют заданную сумму, я не могу это сделать для путей, не начинающихся с корня.