作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.com/problems/goat-latin/description/ 题目描述 A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase l…
题目要求 A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sentence to "Goat Latin" (a made-up language similar to Pig Latin.) The rules of Goat Lat…
A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sentence to "Goat Latin" (a made-up language similar to Pig Latin.) The rules of Goat Latin ar…
Description A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sentence to "Goat Latin" (a made-up language similar to Pig Latin.) The rules of G…
[抄题]: A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sentence to "Goat Latin" (a made-up language similar to Pig Latin.) The rules of Goat La…
class Solution { public: string toGoatLatin(string S) { S.push_back(' '); //add a space that the loop can deal with the last word ,'a'); // string to add 'a' unordered_set<char> vowel={'a','e','i','o','u','A','E','I','O','U'}; ; int len=S.size(); ;…