Fix the Backwards Product Codes

Basic

A data-import job receives product codes that were stored back-to-front. Write the routine that flips each one the right way round.

Implement `solve(String input)` to return `input` with its characters in reverse order.

Examples

Input"apex"
Output"xepa"
Input"Salesforce"
Output"ecrofselaS"
Hints
  • Walk characters from the last index to the first with substring(i, i+1).
Anonymous Apex

Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.