Leetcode 2592. Maximize Greatness of an Array | Hello Interview