Leetcode 2547. Minimum Cost to Split an Array | Hello Interview