Java String Replace First Occurrence Leetcode 752