static int [ ] brute ( int arr [ ] ) {
  int deviation [ ] = new int [ arr . length ] ;
  for ( int k = 0 ;
  k < arr . length ;
  k ++ ) for ( int i = 0 ;
  i < arr . length ;
  i ++ ) deviation [ k ] += Math . abs ( i - arr [ ( i - k + arr . length ) % arr . length ] ) ;
  return deviation ;
}

static int [ ] brute ( int arr [ ] ) { int deviation [ ] = new int [ arr . length ] ; for ( int k = 0 ; k < arr . length ; k ++ ) for ( int i = 0 ; i < arr . length ; i ++ ) deviation [ k ] += Math . abs ( i - arr [ ( i - k + arr . length ) % arr . length ] ) ; return deviation ; }
(method_declaration (modifiers) type: (array_type element: (integral_type) dimensions: (dimensions)) 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) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (field_access object: (identifier) field: (identifier)))))) (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: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (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: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (array_access array: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (field_access object: (identifier) field: (identifier)))) right: (field_access object: (identifier) field: (identifier))))))))))) (return_statement (identifier))))