title: Count Number Binary Strings Without Consecutive 1S
signature: class Solution {
  
      public Long countNumberBinaryStringsWithoutConsecutive1S(Integer n) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Long expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(75, 5527939700884757L);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(14, 987L);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(5, 13L);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(41, 433494437L);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(35, 24157817L);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(30, 2178309L);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(84, 420196140727489673L);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(53, 139583862445L);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Long expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Long actual, Long expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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 ];
  }