static boolean isBSTUtil ( Node root ) {
  if ( root != null ) {
    if ( ! isBSTUtil ( root . left ) ) return false ;
    if ( prev != null && root . data <= prev . data ) return false ;
    prev = root ;
    return isBSTUtil ( root . right ) ;
  }
  return true ;
}

static boolean isBSTUtil ( Node root ) { if ( root != null ) { if ( ! isBSTUtil ( root . left ) ) return false ; if ( prev != null && root . data <= prev . data ) return false ; prev = root ; return isBSTUtil ( root . right ) ; } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) consequence: (return_statement (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (identifier) field: (identifier))))) consequence: (return_statement (false))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (return_statement (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))))) (return_statement (true))))