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


String-1 > comboString
prev  |  next  |  chance

Given 2 strings, a and b, return a string of the form short+long+short, with the shorter string on the outside and the longer string on the inside. The strings will not be the same length, but they may be empty (length 0).

comboString("Hello", "hi") → "hiHellohi"
comboString("hi", "Hello") → "hiHellohi"
comboString("aaa", "b") → "baaab"

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

public String comboString(String a, String b) { }

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

Copyright Nick Parlante 2017 - privacy