title: String Containing First Letter Every Word Given String Spaces
signature: class Solution {
  
      public String stringContainingFirstLetterEveryWordGivenStringSpaces(String str) {
source_py: def string_containing_first_letter_every_word_given_string_spaces(str):
      result = ''
      v = True
      for i in range(len(str)):
          if (str[i] == ' '):
              v = True
          elif ((str[i] != ' ') and (v == True)):
              result += str[i]
              v = False
      return result
source_cpp: string string_containing_first_letter_every_word_given_string_spaces(string str) {
    string result = "";
    bool v = true;
    for ( int i = 0;
    i < str . length ( );
    i ++ ) {
      if ( str [ i ] == ' ' ) v = true;
      else if ( str [ i ] != ' ' && v == true ) {
        result . push_back ( str [ i ] );
        v = false;
      }
    }
    return result;
  }
question_info.extension: java
question_info.entry_fn_name: stringContainingFirstLetterEveryWordGivenStringSpaces
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": "ta", "inputs": {"str": "t a"}}, {"idx": 1, "outputs": "77267", "inputs": {"str": "77 78 2 600 7"}}, {"idx": 2, "outputs": "011", "inputs": {"str": "011 10 10"}}, {"idx": 3, "outputs": "kCOi", "inputs": {"str": "kV Co O iR"}}, {"idx": 4, "outputs": "2", "inputs": {"str": "2"}}, {"idx": 5, "outputs": "01", "inputs": {"str": "0 11"}}, {"idx": 6, "outputs": "Ysw", "inputs": {"str": "Y sT wgheC"}}, {"idx": 7, "outputs": "586", "inputs": {"str": "58 824 6"}}, {"idx": 8, "outputs": "0100", "inputs": {"str": "00 100 001 0111"}}, {"idx": 9, "outputs": "Q", "inputs": {"str": "Q"}}]
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, String 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("t a", "ta");
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("77 78 2 600 7", "77267");
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("011 10 10", "011");
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("kV Co O iR", "kCOi");
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("2", "2");
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("0 11", "01");
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("Y sT wgheC", "Ysw");
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("58 824 6", "586");
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("00 100 001 0111", "0100");
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("Q", "Q");
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String str, String expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(str),expected);
      }
      
      public boolean validateSolution(String actual, String 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__