A binary tree is either an empty tree (represented by an empty pointer) or a
node consisting of a single integer value and two binary trees called the
left subtree and right subtree.
A binary tree T is given. A path in tree T is a non-empty sequence of nodes
of tree T such that each consecutive node in the sequence is a subtree of
its preceding node.
A path P in tree T is given. The amplitude of path P is the maximum
difference between values of nodes on path P. The amplitude of tree T is the
maximum amplitude of paths in T. If tree T is empty, then it does not have
any paths and its amplitude is assumed to be 0.
/font>
// you can also use imports, for example:
// import java.math.*;
class Solution {
public int solution(Tree T) {
// write your code in Java SE 6
}
}