title: Hexagonal Number
signature: def hexagonalNumber(n: 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(n: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        38, 
        2850    
      )}")   
  
  
      println(s"TEST-1...${driver(
        44, 
        3828    
      )}")   
  
  
      println(s"TEST-2...${driver(
        58, 
        6670    
      )}")   
  
  
      println(s"TEST-3...${driver(
        10, 
        190    
      )}")   
  
  
      println(s"TEST-4...${driver(
        31, 
        1891    
      )}")   
  
  
      println(s"TEST-5...${driver(
        53, 
        5565    
      )}")   
  
  
      println(s"TEST-6...${driver(
        94, 
        17578    
      )}")   
  
  
      println(s"TEST-7...${driver(
        64, 
        8128    
      )}")   
  
  
      println(s"TEST-8...${driver(
        71, 
        10011    
      )}")   
  
  
      println(s"TEST-9...${driver(
        59, 
        6903    
      )}")   
  
  }
  
source_py: def hexagonal_number(n):
      return (n * ((2 * n) - 1))
source_cpp: int hexagonal_number(int n) {
    return n * ( 2 * n - 1 );
  }