Java Replace First Occurrence Leetcode Python Easy Problems