leetcode reverse string solution