Solution for Reverse String