1551. Minimum Operations to Make Array Equal

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 1551

class Solution:
    def minOperations(self, n: int) -> int:
        return sum(n - (i << 1 | 1) for i in range(n >> 1))