about | help | code help+videos | done | prefs |
WordScrambler, Part II: mixedWords(String[] words). This method creates and returns a new array of Strings as follows: (1) It takes the first pair of strings in "words" and recombines them - using the "recombine()" method from Part I - to produce a pair of strings for the new array. Let's call this pair of strings w1 and w2. The method should call recombine(w1, w2) and recombine(w2, w1). The resulting words will be the first two elements of the new array. Process successive pairs of words similarly. Example: {"apple", "pear", "this", "cat"} will return {"apar", "peple", "that", "cis" } mixedWords(["apple", "pear", "this", "cat"]) → ["apar", "peple", "that", "cis"] mixedWords(["apple", "pear", "this", "cat", "ng"]) → ["apar", "peple", "that", "cis", "ng"] ...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: 250
Copyright Nick Parlante 2017 - privacy