title: Middle Of Three Using Minimum Comparisons 1
signature: class Solution {
  
      public Integer middleOfThreeUsingMinimumComparisons1(Integer a, Integer b, Integer c) {
source_py: def middle_of_three_using_minimum_comparisons_1(a, b, c):
      if (a > b):
          if (b > c):
              return b
          elif (a > c):
              return c
          else:
              return a
      elif (a > c):
          return a
      elif (b > c):
          return c
      else:
          return b
source_cpp: int middle_of_three_using_minimum_comparisons_1(int a, int b, int c) {
    if ( a > b ) {
      if ( b > c ) return b;
      else if ( a > c ) return c;
      else return a;
    }
    else {
      if ( a > c ) return a;
      else if ( b > c ) return c;
      else return b;
    }
  }
question_info.extension: java
question_info.entry_fn_name: middleOfThreeUsingMinimumComparisons1
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 24, "inputs": {"a": 43, "b": 24, "c": 7}}, {"idx": 1, "outputs": 66, "inputs": {"a": 76, "b": 54, "c": 66}}, {"idx": 2, "outputs": 40, "inputs": {"a": 57, "b": 5, "c": 40}}, {"idx": 3, "outputs": 10, "inputs": {"a": 10, "b": 13, "c": 4}}, {"idx": 4, "outputs": 56, "inputs": {"a": 59, "b": 47, "c": 56}}, {"idx": 5, "outputs": 50, "inputs": {"a": 92, "b": 14, "c": 50}}, {"idx": 6, "outputs": 62, "inputs": {"a": 49, "b": 62, "c": 65}}, {"idx": 7, "outputs": 16, "inputs": {"a": 16, "b": 95, "c": 12}}, {"idx": 8, "outputs": 41, "inputs": {"a": 33, "b": 41, "c": 90}}, {"idx": 9, "outputs": 63, "inputs": {"a": 66, "b": 63, "c": 46}}]
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(43, 24, 7, 24);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(76, 54, 66, 66);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(57, 5, 40, 40);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(10, 13, 4, 10);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(59, 47, 56, 56);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(92, 14, 50, 50);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(49, 62, 65, 62);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(16, 95, 12, 16);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(33, 41, 90, 41);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(66, 63, 46, 63);
          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__