static int CountSteps ( char [ ] s1 , char [ ] s2 , int size ) {
  int i = 0 , j = 0 ;
  int result = 0 ;
  while ( i < size ) {
    j = i ;
    while ( s1 [ j ] != s2 [ i ] ) {
      j += 1 ;
    }
    while ( i < j ) {
      char temp = s1 [ j ] ;
      s1 [ j ] = s1 [ j - 1 ] ;
      s1 [ j - 1 ] = temp ;
      j -= 1 ;
      result += 1 ;
    }
    i += 1 ;
  }
  return result ;
}

static int CountSteps ( char [ ] s1 , char [ ] s2 , int size ) { int i = 0 , j = 0 ; int result = 0 ; while ( i < size ) { j = i ; while ( s1 [ j ] != s2 [ i ] ) { j += 1 ; } while ( i < j ) { char temp = s1 [ j ] ; s1 [ j ] = s1 [ j - 1 ] ; s1 [ j - 1 ] = temp ; j -= 1 ; result += 1 ; } i += 1 ; } return result ; }
(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: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) body: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (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: (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (return_statement (identifier))))