title: Perfect Reversible String
signature: perfectReversibleString :: String -> Bool
  perfectReversibleString str = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: String -> Bool -> String
  driver str expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME str) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver ("ab") (False) )
  
      printf "TEST-1...%s\n" (driver ("303") (True) )
  
      printf "TEST-2...%s\n" (driver ("11110000") (False) )
  
      printf "TEST-3...%s\n" (driver ("aba") (True) )
  
      printf "TEST-4...%s\n" (driver ("404") (True) )
  
      printf "TEST-5...%s\n" (driver ("10101") (True) )
  
      printf "TEST-6...%s\n" (driver ("abab") (False) )
  
      printf "TEST-7...%s\n" (driver ("6366") (False) )
  
      printf "TEST-8...%s\n" (driver ("001") (False) )
  
      printf "TEST-9...%s\n" (driver ("") (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;
  }