title: Perfect Reversible String
signature: pub fn perfect_reversible_string(str: String) -> bool {
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: bool, expected: bool)->bool{
  return actual==expected
  }
  pub fn driver(str: String, expected: bool)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(str), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "ab".to_string(), 
        false
      ));
      
      println!("TEST-1...{}", driver(
        "303".to_string(), 
        true
      ));
      
      println!("TEST-2...{}", driver(
        "11110000".to_string(), 
        false
      ));
      
      println!("TEST-3...{}", driver(
        "aba".to_string(), 
        true
      ));
      
      println!("TEST-4...{}", driver(
        "404".to_string(), 
        true
      ));
      
      println!("TEST-5...{}", driver(
        "10101".to_string(), 
        true
      ));
      
      println!("TEST-6...{}", driver(
        "abab".to_string(), 
        false
      ));
      
      println!("TEST-7...{}", driver(
        "6366".to_string(), 
        false
      ));
      
      println!("TEST-8...{}", driver(
        "001".to_string(), 
        false
      ));
      
      println!("TEST-9...{}", driver(
        "".to_string(), 
        true
      ));
      
  }
source_py: def perfect_reversible_string(str):
      i = 0
      j = (len(str) - 1)
      while (i < j):
          if (str[i] != str[j]):
              return False
          i += 1
          j -= 1
      return True
source_cpp: bool perfect_reversible_string(string str) {
    int i = 0, j = str . length ( ) - 1;
    while ( i < j ) {
      if ( str [ i ] != str [ j ] ) return false;
      i ++;
      j --;
    }
    return true;
  }