Search
⌘K

Leetcode 2967. Minimum Cost to Make Array Equalindromic

Choose a palindromic integer y (< 1e9) to change all elements of nums to, minimizing the total cost sum |nums[i]-y|; this is an L1 minimization problem over the discrete set of palindromic numbers (i.e., pick the palindromic value nearest the median).


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.