LeetCode 3264, Easy. Topics: Array, Math, Heap (Priority Queue), Simulation. View on LeetCode.
Generate this problem as a practice environment: tested reference solution, 18 parametrized pytest cases, and a playground notebook:
Problem
You are given an integer array nums, an integer k, and an integer multiplier.
You need to perform k operations on nums. In each operation:
- Find the minimum value
x in nums. If there are multiple occurrences of the minimum value, select the one that appears first.
- Replace the selected minimum value
x with x * multiplier.
Return an integer array denoting the final state of nums after performing all k operations.
Examples
Explanation:
Explanation:
Constraints
- 1 <= nums.length <= 100
- 1 <= nums[i] <= 100
- 1 <= k <= 10
- 1 <= multiplier <= 5
Solution
Reference implementation from solution.py on GitHub, full suite in test_solution.py:
Complexity
NeetCode All. Last modified on September 7, 2026