Loading...
Loading...
Loading...
A canteen hides its secret coupon by printing it backwards. Read the printed text and print it in the right order, that is, reversed.
Example 1
Input
05EVAS
Output
SAVE50
Example 2
Input
Hello World
Output
dlroW olleH
Spaces stay, they just move to the mirrored place.
Try the problem first. Open one hint at a time.
Walk from the last index down to 0 and append each character to a StringBuilder.
You can also use new StringBuilder(text).reverse(), but try the loop once to see how it works.
Write your Java code, run it on the examples and submit it to hidden tests.
Solve in the editor