title: Count Number Binary Strings Without Consecutive 1S
signature: func countNumberBinaryStringsWithoutConsecutive1S(n int) int64 {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int64, expected int64) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(n int, expected int64) string {
      if validateSolution(PLACEHOLDER_FN_NAME(n),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(75, 5527939700884757)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(14, 987)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(5, 13)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(41, 433494437)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(35, 24157817)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(30, 2178309)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(84, 420196140727489673)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(53, 139583862445)
      fmt.Printf("TEST-7...%s\n", result)
      
          
  }
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 ];
  }