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

 

abraskin@mbusd.org 2019_units1-4_practice > halfOrder
prev  |  next  |  chance

Given a String with an even number of characters, split it in half and put it back together with each half in lexicographic (alphabetic) order unless the halves are the same in which case only return one half.


halfOrder("AB") → "AB"
halfOrder("BA") → "AB"
halfOrder("ABBA") → "ABBA"

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

public String halfOrder(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: 200

Copyright Nick Parlante 2017 - privacy