title: Middle Of Three Using Minimum Comparisons
signature: def middleOfThreeUsingMinimumComparisons(a: Int, b: Int, c: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(a: Int, b: Int, c: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b, c),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        56, 5, 82, 
        56    
      )}")   
  
  
      println(s"TEST-1...${driver(
        56, 60, 17, 
        56    
      )}")   
  
  
      println(s"TEST-2...${driver(
        36, 56, 51, 
        51    
      )}")   
  
  
      println(s"TEST-3...${driver(
        71, 54, 6, 
        54    
      )}")   
  
  
      println(s"TEST-4...${driver(
        3, 70, 81, 
        70    
      )}")   
  
  
      println(s"TEST-5...${driver(
        84, 57, 47, 
        57    
      )}")   
  
  
      println(s"TEST-6...${driver(
        30, 80, 85, 
        80    
      )}")   
  
  
      println(s"TEST-7...${driver(
        82, 54, 32, 
        54    
      )}")   
  
  
      println(s"TEST-8...${driver(
        90, 70, 55, 
        70    
      )}")   
  
  
      println(s"TEST-9...${driver(
        38, 4, 5, 
        5    
      )}")   
  
  }
  
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;
  }