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

 

recombine


Given an String array of any length, return a String array of length 3 where the first element concatenates the first and middle elements of the parameter array, the second element is equal to the middle element of the parameter array, and the third element concatenates the middle and last elements of the parameter array.


Note: The "middle" element can be found by dividing the length of the array in half!

recombine(["a"]) → ["aa", "a", "aa"]
recombine(["a", "b", "c", "d", "e"]) → ["ac", "c", "ce"]
recombine(["0", "1", "2", "3", "4", "5", "6", "7"]) → ["04", "4", "47"]

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

String[] recombine(String[] strs) { }

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

Copyright Nick Parlante 2017 - privacy