title: Google Case Given Sentence
signature: pub fn google_case_given_sentence(s: String) -> String {
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: String, expected: String)->bool{
  return actual==expected
  }
  pub fn driver(s: String, expected: String)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(s), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "TEYndweqZA".to_string(), 
        "tEYNDWEQZA".to_string()
      ));
      
      println!("TEST-1...{}", driver(
        "01865".to_string(), 
        "01865".to_string()
      ));
      
      println!("TEST-2...{}", driver(
        "11001100".to_string(), 
        "11001100".to_string()
      ));
      
      println!("TEST-3...{}", driver(
        "CzwznJmQet".to_string(), 
        "cZWZNJMQET".to_string()
      ));
      
      println!("TEST-4...{}", driver(
        "318305446".to_string(), 
        "318305446".to_string()
      ));
      
      println!("TEST-5...{}", driver(
        "0000001111110".to_string(), 
        "0000001111110".to_string()
      ));
      
      println!("TEST-6...{}", driver(
        "yzT".to_string(), 
        "yZT".to_string()
      ));
      
      println!("TEST-7...{}", driver(
        "38630230".to_string(), 
        "38630230".to_string()
      ));
      
      println!("TEST-8...{}", driver(
        "01101".to_string(), 
        "01101".to_string()
      ));
      
      println!("TEST-9...{}", driver(
        "zoizI".to_string(), 
        "zOIZI".to_string()
      ));
      
  }
source_py: def google_case_given_sentence(s):
      n = len(s)
      s1 = ''
      s1 = (s1 + s[0].lower())
      i = 1
      while (i < n):
          if ((s[i] == ' ') and (i <= n)):
              s1 = ((s1 + ' ') + s[(i + 1)].lower())
              i = (i + 1)
          else:
              s1 = (s1 + s[i].upper())
          i = (i + 1)
      return s1
source_cpp: string google_case_given_sentence(string s) {
    int n = s . length ( );
    s [ 0 ] = tolower ( s [ 0 ] );
    for ( int i = 1;
    i < n;
    i ++ ) {
      if ( s [ i ] == ' ' && i < n ) {
        s [ i + 1 ] = tolower ( s [ i + 1 ] );
        i ++;
      }
      else s [ i ] = toupper ( s [ i ] );
    }
    return s;
  }