Leetcode 1234. Replace the Substring for Balanced String | Hello Interview