Java String Replace First Occurrence Leetcode Solutions With Explanation