You are viewing a single comment's thread. Return to all comments →
robertram's solution does consider the problem of checking that the children nodes are correct for all parent nodes upto root.
Note that the 'min' and 'max' variables get updated when you call the first two recursions. After you pass root.data to min and max once, all subsequent calls will share the same min and max, not the Integer.XXX_VALUE defined.