public static int checkreverse ( int [ ] [ ] arr , int n ) {
  if ( n % 2 == 1 ) return n ;
  for ( int i = n / 2 - 1 ;
  i >= 0 ;
  i -- ) {
    for ( int j = 0 ;
    j < arr [ 0 ] . length ;
    j ++ ) {
      if ( arr [ i ] [ j ] != arr [ n - i - 1 ] [ j ] ) return n ;
    }
  }
  return checkreverse ( arr , n / 2 ) ;
}

public static int checkreverse ( int [ ] [ ] arr , int n ) { if ( n % 2 == 1 ) return n ; for ( int i = n / 2 - 1 ; i >= 0 ; i -- ) { for ( int j = 0 ; j < arr [ 0 ] . length ; j ++ ) { if ( arr [ i ] [ j ] != arr [ n - i - 1 ] [ j ] ) return n ; } } return checkreverse ( arr , n / 2 ) ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (return_statement (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (array_access array: (identifier) index: (decimal_integer_literal)) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) index: (identifier)))) consequence: (return_statement (identifier))))))) (return_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)))))))