title: Count Number Binary Strings Without Consecutive 1S
signature: function countNumberBinaryStringsWithoutConsecutive1S(n: number): number {
source_py: def count_number_binary_strings_without_consecutive_1s(n):
      a = [0 for i in range(n)]
      b = [0 for i in range(n)]
      a[0] = b[0] = 1
      for i in range(1, n):
          a[i] = (a[(i - 1)] + b[(i - 1)])
          b[i] = a[(i - 1)]
      return (a[(n - 1)] + b[(n - 1)])
source_cpp: int count_number_binary_strings_without_consecutive_1s(int n) {
    int a [ n ], b [ n ];
    a [ 0 ] = b [ 0 ] = 1;
    for ( int i = 1;
    i < n;
    i ++ ) {
      a [ i ] = a [ i - 1 ] + b [ i - 1 ];
      b [ i ] = a [ i - 1 ];
    }
    return a [ n - 1 ] + b [ n - 1 ];
  }
question_info.test_list: [{"idx": 0, "outputs": 5527939700884757, "inputs": {"n": 75}}, {"idx": 1, "outputs": 987, "inputs": {"n": 14}}, {"idx": 2, "outputs": 13, "inputs": {"n": 5}}, {"idx": 3, "outputs": 433494437, "inputs": {"n": 41}}, {"idx": 4, "outputs": 24157817, "inputs": {"n": 35}}, {"idx": 5, "outputs": 2178309, "inputs": {"n": 30}}, {"idx": 6, "outputs": 420196140727489673, "inputs": {"n": 84}}, {"idx": 7, "outputs": 139583862445, "inputs": {"n": 53}}]
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(75, 5527939700884757);
    console.log(`TEST-0...${result}`);
  
    result = driver(14, 987);
    console.log(`TEST-1...${result}`);
  
    result = driver(5, 13);
    console.log(`TEST-2...${result}`);
  
    result = driver(41, 433494437);
    console.log(`TEST-3...${result}`);
  
    result = driver(35, 24157817);
    console.log(`TEST-4...${result}`);
  
    result = driver(30, 2178309);
    console.log(`TEST-5...${result}`);
  
    result = driver(84, 420196140727489673);
    console.log(`TEST-6...${result}`);
  
    result = driver(53, 139583862445);
    console.log(`TEST-7...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: countNumberBinaryStringsWithoutConsecutive1S
question_info.test_case_ids: 0 1 2 3 4 5 6 7
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js