HTMLify

LeetCode - Final Array State After K Multiplication Operations I - Python
Views: 7 | Author: abh
class Solution:
    def getFinalState(self, nums: List[int], k: int, multiplier: int) -> List[int]:
        for _ in range(k):
            m = min(nums)
            for i, n in enumerate(nums):
                if n == m:
                    nums[i] *= multiplier
                    break
        return nums

Comments