I need to write a method which check for every junction in a tree if he is a multiply of his sons.
The method signature must be as following:
public static boolean isChildrenProduct (Node node)
For example: if the father is 10 and the sons are 5,2 returns true.
Can some one please can give me an algorithm or pseudo code please ? 10X ! :-)