title: Middle Of Three Using Minimum Comparisons
signature: class Solution {
  
      public Integer middleOfThreeUsingMinimumComparisons(Integer a, Integer b, Integer c) {
source_py: def middle_of_three_using_minimum_comparisons(a, b, c):
      if (((a < b) and (b < c)) or ((c < b) and (b < a))):
          return b
      if (((b < a) and (a < c)) or ((c < a) and (a < b))):
          return a
      else:
          return c
source_cpp: int middle_of_three_using_minimum_comparisons(int a, int b, int c) {
    if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b;
    else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a;
    else return c;
  }
question_info.extension: java
question_info.entry_fn_name: middleOfThreeUsingMinimumComparisons
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 56, "inputs": {"a": 56, "b": 5, "c": 82}}, {"idx": 1, "outputs": 56, "inputs": {"a": 56, "b": 60, "c": 17}}, {"idx": 2, "outputs": 51, "inputs": {"a": 36, "b": 56, "c": 51}}, {"idx": 3, "outputs": 54, "inputs": {"a": 71, "b": 54, "c": 6}}, {"idx": 4, "outputs": 70, "inputs": {"a": 3, "b": 70, "c": 81}}, {"idx": 5, "outputs": 57, "inputs": {"a": 84, "b": 57, "c": 47}}, {"idx": 6, "outputs": 80, "inputs": {"a": 30, "b": 80, "c": 85}}, {"idx": 7, "outputs": 54, "inputs": {"a": 82, "b": 54, "c": 32}}, {"idx": 8, "outputs": 70, "inputs": {"a": 90, "b": 70, "c": 55}}, {"idx": 9, "outputs": 5, "inputs": {"a": 38, "b": 4, "c": 5}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer a, Integer b, Integer c, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(a, b, c,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(56, 5, 82, 56);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(56, 60, 17, 56);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(36, 56, 51, 51);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(71, 54, 6, 54);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(3, 70, 81, 70);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(84, 57, 47, 57);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(30, 80, 85, 80);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(82, 54, 32, 54);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(90, 70, 55, 70);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(38, 4, 5, 5);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer a, Integer b, Integer c, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(a, b, c),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__