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

 

reverseEachHalf


Given a String, return a string where the first half is the first half of the original string in reverse order followed by the second half of the original string in reverse order. A string with an odd number of characters should consider the extra character to be part of the second half of the string.


reverseEachHalf("1234567890") → "5432109876"
reverseEachHalf("12345") → "21543"
reverseEachHalf("kcaBsdraw") → "Backwards"

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

String reverseEachHalf(String s) { }

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 Post-solution available

Copyright Nick Parlante 2017 - privacy