Validate the Reversible Reference
Intermediate SolvedA reference-number scheme is designed to read identically forwards and backwards as a self-check. Verify whether a given reference is valid under that rule.
Implement `solve(String input)` to return true if `input` reads the same forwards and backwards, false otherwise.
Examples
Input
"racecar"Output
trueInput
"apex"Output
falseHints
- Compare characters from both ends inward; any mismatch means it is not a palindrome.
Tests
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.