Search
⌘K

Leetcode 1846. Maximum Element After Decreasing and Rearranging

You can reorder and decrease array elements so the first element is 1 and every adjacent difference is at most 1; return the largest possible value any element can have after such operations. The task is to decide how to lower and arrange values to maximize the sequence's final peak under the adjacent-difference constraint.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.