static int longestsubarray ( int arr [ ] , int n , int x ) {
  modifyarr ( arr , n , x ) ;
  calcprefix ( arr , n ) ;
  return maxIndexDiff ( arr , n ) ;
}

static int longestsubarray ( int arr [ ] , int n , int x ) { modifyarr ( arr , n , x ) ; calcprefix ( arr , n ) ; return maxIndexDiff ( arr , n ) ; }
(method_declaration (modifiers) type: (integral_type) 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 (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))))