We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You are given a binary tree in which each node contains an integer value.
Find the number of paths which sum is divisible by K
K
The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes).
Example:
root = [10,5,-3,2,2,null,18,3,-2,null,1], sum = 5
10 / \ 5 -3 / \ \ 2 2 18 / \ \ 3 -2 1
Return 10. The paths which sum is divisible by 5 are:
The text was updated successfully, but these errors were encountered:
hamidgasmi
No branches or pull requests
You are given a binary tree in which each node contains an integer value.
Find the number of paths which sum is divisible by
K
The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes).
Example:
root = [10,5,-3,2,2,null,18,3,-2,null,1], sum = 5
Return 10. The paths which sum is divisible by 5 are:
The text was updated successfully, but these errors were encountered: