simplify reverse_words_in_a_string.cpp