SuitcaseSensitive
Statement
Goal
Given a string sentence made of words, if a word ends with the same substring as the next word starts with, merge them. Use the longest substring possible.Also, if the case is different between the common letters, always keep the last word's case
Input
A string sentence
Output
the merged string sentence
Constraints
sentence only contains spaces and alphabetic char
Example
Input
Coding Game
Output
CodinGame
Game modes
Fastest, Shortest, Reverse
Test cases
Basic one Test
Input
Coding Game
Output
CodinGame
Validator 1 Validator
Input
Creep Pepper
Output
CreePepper
Longer sentence Test
Input
What time is it
Output
Whatime is it
Validator 2 Validator
Input
its seven oclock
Output
itseven oclock
Deeper ! Test
Input
rat atm is an uncommon kind of rat known for always finding the best rate
Output
ratm is an uncommon kind of rat known for always finding the best rate
Validator 3 Validator
Input
do you like Veridis disQuo
Output
do you like VeridisQuo
CaPs LoCk Test
Input
aLpHaBet bETa TeST
Output
aLpHabETa TeST
Validator 4 Validator
Input
cAr aRiThmETic
Output
caRiThmETic
One word Test
Input
SEGAmeoftrhone
Output
SEGAmeoftrhone
Validator 6 Validator
Input
CompuTera
Output
CompuTera
tricky one Test
Input
Kayak KAyak Yakuza
Output
KAYakuza
Validator 7 Validator
Input
Arara ARARA araruta
Output
ARararuta
One last check before you go Test
Input
is Simba bAd
Output
iSimbAd
Validator 8 Validator
Input
Hello Lollipop is on my Android Device
Output
HelLollipop is on my AndroiDevice
Test 8 Test
Input
citizen Citizen Erased Sedative
Output
Citizen EraSedative
Validator 8 Validator
Input
Validator validator test tested
Output
validator tested
Test 9 Test
Input
AA B BD BDC
Output
AA BDC
Validator 9 Validator
Input
BD D DBAAA
Output
BDBAAA
Test 10 Test
Input
alpha pha habe betic
Output
alphabetic
Validator 10 Validator
Input
sUb ubst str tRing ring
Output
substring
Test 11 Test
Input
CL laS ash O oF f CO od dE e
Output
Clash of Code
Validator 11 Validator
Input
SO oL lu uT ti iO on
Output
Solution
Solution language
Solution
Stub generator input