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

 

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

Given two Strings, each with a even number of characters, return a new String with only the first half of each combined in lexicographic (alphabetical) order unless the halves are the same in which case only return "X".


combineHalvesOrder("AB", "CD") → "AC"
combineHalvesOrder("CD", "AB") → "AC"
combineHalvesOrder("ABBA", "AB") → "AAB"

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

public String combineHalvesOrder(String s1, String s2) { }

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