title: Count Number Of Ways To Fill A N X 4 Grid Using 1 X 4 Tiles
signature: function countNumberOfWaysToFillANX4GridUsing1X4Tiles(n: number): number {
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 ];
  }
question_info.test_list: [{"idx": 0, "outputs": 188941273, "inputs": {"n": 61}}, {"idx": 1, "outputs": 657, "inputs": {"n": 22}}, {"idx": 2, "outputs": 685792227, "inputs": {"n": 65}}, {"idx": 3, "outputs": 52054840, "inputs": {"n": 57}}, {"idx": 4, "outputs": 59864, "inputs": {"n": 36}}, {"idx": 5, "outputs": 1728, "inputs": {"n": 25}}, {"idx": 6, "outputs": 95, "inputs": {"n": 16}}, {"idx": 7, "outputs": 2385, "inputs": {"n": 26}}, {"idx": 8, "outputs": 4123691589365, "inputs": {"n": 92}}, {"idx": 9, "outputs": 3, "inputs": {"n": 5}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(n: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(61, 188941273);
    console.log(`TEST-0...${result}`);
  
    result = driver(22, 657);
    console.log(`TEST-1...${result}`);
  
    result = driver(65, 685792227);
    console.log(`TEST-2...${result}`);
  
    result = driver(57, 52054840);
    console.log(`TEST-3...${result}`);
  
    result = driver(36, 59864);
    console.log(`TEST-4...${result}`);
  
    result = driver(25, 1728);
    console.log(`TEST-5...${result}`);
  
    result = driver(16, 95);
    console.log(`TEST-6...${result}`);
  
    result = driver(26, 2385);
    console.log(`TEST-7...${result}`);
  
    result = driver(92, 4123691589365);
    console.log(`TEST-8...${result}`);
  
    result = driver(5, 3);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: countNumberOfWaysToFillANX4GridUsing1X4Tiles
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js