劍指offer之翻轉單詞順序(C++/Java雙重實現)

1.題目描述 輸入一個英文句子,翻轉句子中單詞的順序,但單詞內字符的順序不變。爲簡單起見,標點符號和普通字母同樣處理。例如輸入字符串"I am a student. 「,則輸出"student. a am I」。 示例 1: 輸入: 「the sky is blue」 輸出: 「blue is sky the」 示例 2: 輸入: " hello world! " 輸出: 「world! hell
相關文章
相關標籤/搜索