FunctionRacerProblemsRace

Goat Latin

EasyStringsPython, JavaScript, TypeScript, Java, C++

Words in sentence are separated by single spaces. Turn each word into goat latin, using its position i (starting at 1):

Return the new words joined by single spaces.

Example 1

sentence "I speak Goat Latin"
returns "Imaa peaksmaaa oatGmaaaa atinLmaaaaa"

Imaa, peaksmaaa, oatGmaaaa, atinLmaaaaa.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Strings problems