In this tutorial, I have explained binary tree root to leaf path sum solution using recursion and also explained it's java code.
Path Sum LeetCode Solution. Given a binary tree and a sum, Determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
If path is found then return true else return false.
Note: Any node whose left and right children is null is known as leaf node.
Java code to find path sum - [ Ссылка ]
Website - [ Ссылка ]
In this tutorial, I have explained a recursive solution to find root-to-leaf path.
![](https://i.ytimg.com/vi/__BOscZAIFk/maxresdefault.jpg)