static TNode sortedArrayToBST ( int arr [ ] , int start , int end ) {
  if ( start > end ) return null ;
  int mid = ( start + end ) / 2 ;
  TNode root = newNode ( arr [ mid ] ) ;
  root . left = sortedArrayToBST ( arr , start , mid - 1 ) ;
  root . right = sortedArrayToBST ( arr , mid + 1 , end ) ;
  return root ;
}

static TNode sortedArrayToBST ( int arr [ ] , int start , int end ) { if ( start > end ) return null ; int mid = ( start + end ) / 2 ; TNode root = newNode ( arr [ mid ] ) ; root . left = sortedArrayToBST ( arr , start , mid - 1 ) ; root . right = sortedArrayToBST ( arr , mid + 1 , end ) ; return root ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (return_statement (null_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))) (return_statement (identifier))))