title: Print Words String Reverse Order
signature: pub fn print_words_string_reverse_order(str: String) -> String {
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: String, expected: String)->bool{
  return actual==expected
  }
  pub fn driver(str: String, expected: String)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(str), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "m Dm YZ".to_string(), 
        "YZ Dm m".to_string()
      ));
      
      println!("TEST-1...{}", driver(
        "65 48 57 71".to_string(), 
        "71 57 48 65".to_string()
      ));
      
      println!("TEST-2...{}", driver(
        "01 010".to_string(), 
        "010 01".to_string()
      ));
      
      println!("TEST-3...{}", driver(
        "mT vhByi".to_string(), 
        "vhByi mT".to_string()
      ));
      
      println!("TEST-4...{}", driver(
        "19 44 9 1".to_string(), 
        "1 9 44 19".to_string()
      ));
      
      println!("TEST-5...{}", driver(
        "0".to_string(), 
        "0".to_string()
      ));
      
      println!("TEST-6...{}", driver(
        "z vUi  ".to_string(), 
        "  vUi z".to_string()
      ));
      
      println!("TEST-7...{}", driver(
        "7 591 36643 9 055".to_string(), 
        "055 9 36643 591 7".to_string()
      ));
      
      println!("TEST-8...{}", driver(
        "01".to_string(), 
        "01".to_string()
      ));
      
      println!("TEST-9...{}", driver(
        "ti YGaijPY".to_string(), 
        "YGaijPY ti".to_string()
      ));
      
  }
source_py: def print_words_string_reverse_order(str):
      i = (len(str) - 1)
      start = end = (i + 1)
      result = ''
      while (i >= 0):
          if (str[i] == ' '):
              start = (i + 1)
              while (start != end):
                  result += str[start]
                  start += 1
              result += ' '
              end = i
          i -= 1
      start = 0
      while (start != end):
          result += str[start]
          start += 1
      return result
source_cpp: string print_words_string_reverse_order(string str) {
    int i = str . length ( ) - 1;
    int start, end = i + 1;
    string result = "";
    while ( i >= 0 ) {
      if ( str [ i ] == ' ' ) {
        start = i + 1;
        while ( start != end ) result += str [ start ++ ];
        result += ' ';
        end = i;
      }
      i --;
    }
    start = 0;
    while ( start != end ) result += str [ start ++ ];
    return result;
  }