about | help | code help+videos | done | prefs |
Write a method that turns a normal string into a "Yoda talk" string by reversing the order of all of the words in the string. Words are separated by a single space character. As preconditions you may assume the input string will never have more than one space in a row and will not start or end with a space. It IS possible for the string to have NO SPACES or to be an empty string. Oct11_2019_HL_yodaTalk("Ummm, the force is strong with you, umm") → "umm you, with strong is force the Ummm," Oct11_2019_HL_yodaTalk("I am talking backwards") → "backwards talking am I" Oct11_2019_HL_yodaTalk("You are a super programmer") → "programmer super a are You" ...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: 350
Copyright Nick Parlante 2017 - privacy