title: Count Number Of Ways To Fill A N X 4 Grid Using 1 X 4 Tiles
signature: count_number_of_ways_to_fill_a_n_x_4_grid_using_1_x_4_tiles <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          61L, 
          188941273L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          22L, 
          657L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          65L, 
          685792227L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          57L, 
          52054840L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          36L, 
          59864L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          25L, 
          1728L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          16L, 
          95L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          26L, 
          2385L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          92L, 
          4123691589365L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          5L, 
          3L
      )))
  
  }
  
  main()
source_py: def count_number_of_ways_to_fill_a_n_x_4_grid_using_1_x_4_tiles(n):
      dp = [0 for _ in range((n + 1))]
      for i in range(1, (n + 1)):
          if (i <= 3):
              dp[i] = 1
          elif (i == 4):
              dp[i] = 2
          else:
              dp[i] = (dp[(i - 1)] + dp[(i - 4)])
      return dp[n]
source_cpp: int count_number_of_ways_to_fill_a_n_x_4_grid_using_1_x_4_tiles(int n) {
    int dp [ n + 1 ];
    dp [ 0 ] = 0;
    for ( int i = 1;
    i <= n;
    i ++ ) {
      if ( i >= 1 && i <= 3 ) dp [ i ] = 1;
      else if ( i == 4 ) dp [ i ] = 2;
      else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ];
    }
    return dp [ n ];
  }