title: Dynamic Programming High Effort Vs Low Effort Tasks Problem
signature: dynamic_programming_high_effort_vs_low_effort_tasks_problem <- function(high, low, n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(high, low, n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(high, low, n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          list(1L, 3L, 9L, 10L, 13L, 14L, 15L, 15L, 17L, 22L, 23L, 28L, 30L, 31L, 37L, 42L, 45L, 62L, 62L, 68L, 68L, 68L, 78L, 79L, 82L, 84L, 87L, 90L, 99L), list(5L, 10L, 11L, 14L, 16L, 22L, 24L, 30L, 34L, 35L, 37L, 37L, 39L, 41L, 42L, 42L, 43L, 55L, 57L, 63L, 71L, 76L, 83L, 83L, 85L, 90L, 91L, 97L, 99L), 18L, 
          537L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          list(-78L, -12L, 26L, 80L, 50L, 4L, -80L, 86L, 12L, -2L, 18L, -50L, -90L, 56L, -50L, 88L, -62L, 96L, -44L, -82L, 56L), list(-44L, -14L, 14L, 0L, 30L, 78L, 40L, -12L, -44L, -16L, 60L, -12L, -50L, -66L, 70L, -98L, -56L, 48L, -82L, 94L, 14L), 16L, 
          452L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          list(1L), list(1L), 0L, 
          0L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          list(21L, 28L, 13L, 48L, 26L, 49L, 16L, 70L, 81L, 35L, 74L, 12L, 97L, 61L, 10L, 84L, 94L, 78L, 40L, 30L, 30L, 84L, 41L, 4L, 95L, 79L, 38L, 29L, 9L), list(49L, 88L, 25L, 93L, 24L, 56L, 47L, 44L, 33L, 27L, 86L, 57L, 21L, 25L, 64L, 44L, 37L, 99L, 36L, 54L, 17L, 29L, 37L, 17L, 26L, 43L, 61L, 27L, 21L), 25L, 
          1261L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          list(-80L, -36L, -32L, -20L, -14L, -12L, 10L, 12L, 72L), list(-76L, -54L, -50L, -28L, 0L, 58L, 70L, 78L, 90L), 4L, 
          -56L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          list(1L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 0L, 0L, 1L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 1L), list(0L, 0L, 1L, 1L, 1L, 0L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 0L, 0L, 0L, 1L), 24L, 
          15L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          list(1L, 7L, 9L, 10L, 13L, 14L, 15L, 20L, 23L, 24L, 24L, 24L, 26L, 27L, 29L, 31L, 32L, 33L, 34L, 35L, 46L, 48L, 49L, 51L, 51L, 53L, 53L, 56L, 56L, 60L, 62L, 64L, 64L, 70L, 73L, 73L, 73L, 74L, 77L, 78L, 79L, 79L, 79L, 80L, 86L, 89L, 89L, 92L, 98L), list(1L, 3L, 3L, 4L, 8L, 8L, 10L, 10L, 10L, 12L, 12L, 15L, 15L, 22L, 23L, 28L, 28L, 30L, 31L, 33L, 34L, 35L, 36L, 36L, 36L, 42L, 44L, 44L, 51L, 54L, 57L, 58L, 59L, 59L, 63L, 65L, 66L, 68L, 69L, 71L, 73L, 76L, 77L, 78L, 79L, 79L, 86L, 87L, 93L), 31L, 
          784L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          list(56L, 48L, 40L, -56L, 44L, -86L, -28L, -32L, -34L, 4L, -94L, -14L, 28L, -74L), list(82L, -40L, -16L, -64L, 12L, -6L, 60L, 48L, -58L, -4L, 42L, -28L, 24L, -58L), 8L, 
          268L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          list(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L), list(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L), 16L, 
          5L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          list(85L, 13L, 35L, 57L, 8L, 48L, 65L, 54L, 88L, 7L, 66L, 30L, 47L, 51L), list(1L, 42L, 42L, 89L, 3L, 21L, 49L, 98L, 4L, 59L, 26L, 85L, 53L, 34L), 8L, 
          453L
      )))
  
  }
  
  main()
source_py: def dynamic_programming_high_effort_vs_low_effort_tasks_problem(high, low, n):
      if (n <= 0):
          return 0
      return max((high[(n - 1)] + dynamic_programming_high_effort_vs_low_effort_tasks_problem(high, low, (n - 2))), (low[(n - 1)] + dynamic_programming_high_effort_vs_low_effort_tasks_problem(high, low, (n - 1))))
source_cpp: int dynamic_programming_high_effort_vs_low_effort_tasks_problem(vector<int> high, vector<int> low, int n) {
    if ( n <= 0 ) return 0;
    return max ( high [ n - 1 ] + dynamic_programming_high_effort_vs_low_effort_tasks_problem ( high, low, ( n - 2 ) ), low [ n - 1 ] + dynamic_programming_high_effort_vs_low_effort_tasks_problem ( high, low, ( n - 1 ) ) );
  }