static int isPalindrome ( char str [ ] ) {
  int length = str . length ;
  stack = new char [ length * 4 ] ;
  int i , mid = length / 2 ;
  for ( i = 0 ;
  i < mid ;
  i ++ ) {
    push ( str [ i ] ) ;
  }
  if ( length % 2 != 0 ) {
    i ++ ;
  }
  while ( i < length ) {
    char ele = pop ( ) ;
    if ( ele != str [ i ] ) return 0 ;
    i ++ ;
  }
  return 1 ;
}

static int isPalindrome ( char str [ ] ) { int length = str . length ; stack = new char [ length * 4 ] ; int i , mid = length / 2 ; for ( i = 0 ; i < mid ; i ++ ) { push ( str [ i ] ) ; } if ( length % 2 != 0 ) { i ++ ; } while ( i < length ) { char ele = pop ( ) ; if ( ele != str [ i ] ) return 0 ; i ++ ; } return 1 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (expression_statement (update_expression (identifier))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))) consequence: (return_statement (decimal_integer_literal))) (expression_statement (update_expression (identifier))))) (return_statement (decimal_integer_literal))))