static int getLeftMostElement ( Queue < Integer > zero , Queue < Integer > one ) {
  if ( zero . isEmpty ( ) && one . isEmpty ( ) ) return - 1 ;
  else if ( zero . isEmpty ( ) ) {
    one . remove ( ) ;
    return 1 ;
  }
  else if ( one . isEmpty ( ) ) {
    zero . remove ( ) ;
    return 0 ;
  }
  int res = ( zero . peek ( ) < one . peek ( ) ) ? 0 : 1 ;
  if ( res == 0 ) zero . remove ( ) ;
  else one . remove ( ) ;
  return res ;
}

static int getLeftMostElement ( Queue < Integer > zero , Queue < Integer > one ) { if ( zero . isEmpty ( ) && one . isEmpty ( ) ) return - 1 ; else if ( zero . isEmpty ( ) ) { one . remove ( ) ; return 1 ; } else if ( one . isEmpty ( ) ) { zero . remove ( ) ; return 0 ; } int res = ( zero . peek ( ) < one . peek ( ) ) ? 0 : 1 ; if ( res == 0 ) zero . remove ( ) ; else one . remove ( ) ; return res ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) consequence: (return_statement (unary_expression operand: (decimal_integer_literal))) alternative: (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (return_statement (decimal_integer_literal))) alternative: (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (return_statement (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (ternary_expression condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) consequence: (decimal_integer_literal) alternative: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) alternative: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (return_statement (identifier))))