id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

srp4379@lausd.net ap1 > mixedWords
prev  |  next  |  chance

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)

public String[] mixedWords(String[] words) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 250

Copyright Nick Parlante 2017 - privacy