title: Count Strings With Consecutive 1S
signature: def countStringsWithConsecutive1S(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Long , expected: Long): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Long): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        27, 
        133703499L    
      )}")   
  
  
      println(s"TEST-1...${driver(
        13, 
        7582L    
      )}")   
  
  
      println(s"TEST-2...${driver(
        33, 
        8580707127L    
      )}")   
  
  
      println(s"TEST-3...${driver(
        57, 
        144114231353829831L    
      )}")   
  
  
      println(s"TEST-4...${driver(
        51, 
        2251746497394075L    
      )}")   
  
  
      println(s"TEST-5...${driver(
        10, 
        880L    
      )}")   
  
  
      println(s"TEST-6...${driver(
        1, 
        0L    
      )}")   
  
  }
  
source_py: def count_strings_with_consecutive_1s(n):
      a = ([0] * n)
      b = ([0] * 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 (((1 << n) - a[(n - 1)]) - b[(n - 1)])
source_cpp: int count_strings_with_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 ( 1 << n ) - a [ n - 1 ] - b [ n - 1 ];
  }