title: Count Characters Position English Alphabets
signature: class Solution {
  
      public Integer countCharactersPositionEnglishAlphabets(String str) {
source_py: def count_characters_position_english_alphabets(str):
      result = 0
      for i in range(len(str)):
          if ((i == (ord(str[i]) - ord('a'))) or (i == (ord(str[i]) - ord('A')))):
              result += 1
      return result
source_cpp: int count_characters_position_english_alphabets(string str) {
    int result = 0;
    for ( int i = 0;
    i < str . size ( );
    i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++;
    return result;
  }
question_info.extension: java
question_info.entry_fn_name: countCharactersPositionEnglishAlphabets
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"str": "lLkhFeZGcb"}}, {"idx": 1, "outputs": 3, "inputs": {"str": "ABcED"}}, {"idx": 2, "outputs": 1, "inputs": {"str": "geeksforgeeks"}}, {"idx": 3, "outputs": 3, "inputs": {"str": "Alphabetical"}}, {"idx": 4, "outputs": 2, "inputs": {"str": "abababab"}}, {"idx": 5, "outputs": 0, "inputs": {"str": "bcdefgxyz"}}, {"idx": 6, "outputs": 1, "inputs": {"str": "cBzaqx L"}}, {"idx": 7, "outputs": 3, "inputs": {"str": " bcd"}}, {"idx": 8, "outputs": 0, "inputs": {"str": "11"}}, {"idx": 9, "outputs": 0, "inputs": {"str": "MqqKY"}}]
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, Integer 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("lLkhFeZGcb", 0);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("ABcED", 3);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("geeksforgeeks", 1);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("Alphabetical", 3);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("abababab", 2);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("bcdefgxyz", 0);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("cBzaqx L", 1);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(" bcd", 3);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("11", 0);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("MqqKY", 0);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String str, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(str),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer 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__