title: Perfect Reversible String
signature: class Solution {
  
      public Boolean perfectReversibleString(String str) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: perfectReversibleString
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": false, "inputs": {"str": "ab"}}, {"idx": 1, "outputs": true, "inputs": {"str": "303"}}, {"idx": 2, "outputs": false, "inputs": {"str": "11110000"}}, {"idx": 3, "outputs": true, "inputs": {"str": "aba"}}, {"idx": 4, "outputs": true, "inputs": {"str": "404"}}, {"idx": 5, "outputs": true, "inputs": {"str": "10101"}}, {"idx": 6, "outputs": false, "inputs": {"str": "abab"}}, {"idx": 7, "outputs": false, "inputs": {"str": "6366"}}, {"idx": 8, "outputs": false, "inputs": {"str": "001"}}, {"idx": 9, "outputs": true, "inputs": {"str": ""}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(String str, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(str,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution("ab", false);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("303", true);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("11110000", false);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("aba", true);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("404", true);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("10101", true);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("abab", false);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("6366", false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("001", false);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("", true);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String str, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(str),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__