Maximize Greatness Of An Array Leetcode