Trees: Is This a Binary Search Tree?

  • + 1 comment

    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.