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

 

andersoniii.edwin@cusd80.com > unWeaveWords2
prev  |  next  |  chance

Un-Weaving Words2 - This is a new word game - Given one word, write a program that will "un-weave" the word into two words of different lengths. The input will be the combined words and an integer representing the shortest word. Take the first letter from String combo and place into the first string and take the next letter and place into second string. Continue this pattern. When you have taken the number of letters allocated for the short string then the rest of the letters from "combo" are for the first string. Return the resulting "Un-Weave Word" into two words combined onto one string separated by a hyphen. example:"aslopuhpabet" 4 becomes: "alphabet-soup"


unWeaveWords2("aslopuhpabet", 4) → "alphabet-soup"
unWeaveWords2("wweoarvdes", 5) → "weave-words"
unWeaveWords2("mdoam", 2) → "mom-da"

...Save, Compile, Run (ctrl-enter)

public String unWeaveWords2(String combo, int smallest) { }

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: 112

Copyright Nick Parlante 2017 - privacy