+ 1

Challenge #7

Rotate this string "ABCDEFGH" as "EFGHABCD" any programming languages are welcome !!!

21st Nov 2017, 7:30 AM
Amar Dahake
4 Answers
+ 9
We demand more test cases! How about strings in other lengths and after the rotation as well?
21st Nov 2017, 8:08 AM
Zephyr Koo
Zephyr Koo - avatar
+ 3
more test cases please. solution to this one can also be print("EFGHABCD")
21st Nov 2017, 5:11 PM
Aditya Rana
+ 3
if you mean half of the second string plus half of the first string, it's here. https://code.sololearn.com/cpzxukQWEqM1/?ref=app
21st Nov 2017, 5:28 PM
Aditya Rana
+ 2
if we have to rotate that string only then this is the code class ABC{ public static void main ( String args[]){ String a="ABCDEFGH"; String b= a.substring(0,4); String c= a.substring(4,8); String d= c+b; System.out.println(d); } }
21st Nov 2017, 8:11 AM
Devbrath
Devbrath - avatar