about | help | code help+videos | done | prefs |
Write a method that returns the "Yoda" version of a string. It does this by reversing the order of all the words in the sentence. A 'word' is considered any non-space characters in a row separated by a space. Note that there will also be an extra space at the end of the new string, so in all cases the new string will end in a space. oct18_2016_HL_yodaTalk("Yoda") → "Yoda " oct18_2016_HL_yodaTalk("I am talking backwards") → "backwards talking am I " oct18_2016_HL_yodaTalk("the Force is with you") → "you with is Force the " ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy