title: Recursively Break Number 3 Parts Get Maximum Sum 1
signature: def recursivelyBreakNumber3PartsGetMaximumSum1(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(
        50, 
        57    
      )}")   
  
  
      println(s"TEST-1...${driver(
        83, 
        93    
      )}")   
  
  
      println(s"TEST-2...${driver(
        18, 
        19    
      )}")   
  
  
      println(s"TEST-3...${driver(
        24, 
        27    
      )}")   
  
  
      println(s"TEST-4...${driver(
        31, 
        32    
      )}")   
  
  
      println(s"TEST-5...${driver(
        38, 
        41    
      )}")   
  
  
      println(s"TEST-6...${driver(
        94, 
        104    
      )}")   
  
  
      println(s"TEST-7...${driver(
        24, 
        27    
      )}")   
  
  
      println(s"TEST-8...${driver(
        13, 
        13    
      )}")   
  
  
      println(s"TEST-9...${driver(
        53, 
        57    
      )}")   
  
  }
  
source_py: def recursively_break_number_3_parts_get_maximum_sum_1(n):
      dp = ([0] * (n + 1))
      dp[0] = 0
      dp[1] = 1
      for i in range(2, (n + 1)):
          dp[i] = max(((dp[int((i / 2))] + dp[int((i / 3))]) + dp[int((i / 4))]), i)
      return dp[n]
source_cpp: int recursively_break_number_3_parts_get_maximum_sum_1(int n) {
    int dp [ n + 1 ];
    dp [ 0 ] = 0, dp [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) dp [ i ] = max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ], i );
    return dp [ n ];
  }