Ericsson interview question

reverse a string