Solution contribution to reversing a string