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

 

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

Un-Weaving Words3 - (going backwards) 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 LAST letter from String combo and place into the first string and take the next letter from Combo (backwards)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:"tebsaphupolsa" 5 becomes: "alphabet-soups"


unWeaveWords3("gfedcba", 3) → "aceg-bdf"
unWeaveWords3("maodm", 2) → "mom-da"
unWeaveWords3("cbbaa", 2) → "abc-ab"

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

public String unWeaveWords3(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: 115 Post-solution available

Copyright Nick Parlante 2017 - privacy