Java is the future !: frontBack

Sunday, October 10, 2010

frontBack

You've given a string, you've to return a new string where the first and last characters have been exchanged. For example

frontBack("doct") → "todd"
frontBack("x") → "x"
frontBack("pq") → "qp"

Solution :

No comments:

Post a Comment