title: Number Subsequences Form Ai Bj Ck
signature: pub fn number_subsequences_form_ai_bj_ck(s: String) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(s: String, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(s), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "".to_string(), 
        0
      ));
      
      println!("TEST-1...{}", driver(
        "abbc".to_string(), 
        3
      ));
      
      println!("TEST-2...{}", driver(
        "abcabc".to_string(), 
        7
      ));
      
      println!("TEST-3...{}", driver(
        "agsdbkfdc ".to_string(), 
        1
      ));
      
      println!("TEST-4...{}", driver(
        "ababab".to_string(), 
        0
      ));
      
      println!("TEST-5...{}", driver(
        "aaaaaaa".to_string(), 
        0
      ));
      
      println!("TEST-6...{}", driver(
        "aabaaabcc".to_string(), 
        111
      ));
      
      println!("TEST-7...{}", driver(
        "19".to_string(), 
        0
      ));
      
      println!("TEST-8...{}", driver(
        "1001100".to_string(), 
        0
      ));
      
      println!("TEST-9...{}", driver(
        "DtAnuQbU".to_string(), 
        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;
  }