Amazon interview question

1. reverse a string