Solve "reverse a string" prob from InterviewCake