Leetcode 1846. Maximum Element After Decreasing and Rearranging | Hello Interview