1558. Minimum Numbers of Function Calls to Make Target Array

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

On This Page

LeetCode problem 1558

class Solution:
    def minOperations(self, nums: List[int]) -> int:
        return sum(v.bit_count() for v in nums) + max(0, max(nums).bit_length() - 1)