title: Number Subsequences Form Ai Bj Ck
signature: def numberSubsequencesFormAiBjCk(s: String) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(s: String, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(s),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        "", 
        0    
      )}")   
  
  
      println(s"TEST-1...${driver(
        "abbc", 
        3    
      )}")   
  
  
      println(s"TEST-2...${driver(
        "abcabc", 
        7    
      )}")   
  
  
      println(s"TEST-3...${driver(
        "agsdbkfdc ", 
        1    
      )}")   
  
  
      println(s"TEST-4...${driver(
        "ababab", 
        0    
      )}")   
  
  
      println(s"TEST-5...${driver(
        "aaaaaaa", 
        0    
      )}")   
  
  
      println(s"TEST-6...${driver(
        "aabaaabcc", 
        111    
      )}")   
  
  
      println(s"TEST-7...${driver(
        "19", 
        0    
      )}")   
  
  
      println(s"TEST-8...${driver(
        "1001100", 
        0    
      )}")   
  
  
      println(s"TEST-9...${driver(
        "DtAnuQbU", 
        0    
      )}")   
  
  }
  
source_py: def number_subsequences_form_ai_bj_ck(s):
      aCount = 0
      bCount = 0
      cCount = 0
      for i in range(len(s)):
          if (s[i] == 'a'):
              aCount = (1 + (2 * aCount))
          elif (s[i] == 'b'):
              bCount = (aCount + (2 * bCount))
          elif (s[i] == 'c'):
              cCount = (bCount + (2 * cCount))
      return cCount
source_cpp: int number_subsequences_form_ai_bj_ck(string s) {
    int aCount = 0;
    int bCount = 0;
    int cCount = 0;
    for ( unsigned int i = 0;
    i < s . size ( );
    i ++ ) {
      if ( s [ i ] == 'a' ) aCount = ( 1 + 2 * aCount );
      else if ( s [ i ] == 'b' ) bCount = ( aCount + 2 * bCount );
      else if ( s [ i ] == 'c' ) cCount = ( bCount + 2 * cCount );
    }
    return cCount;
  }