Practice Final Array State After K Multiplication Operations II
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Final Array State After K Multiplication Operations II
Problem Statement
Perform exactly k operations on nums. Each operation chooses the smallest current value, breaking ties by the earliest index, and multiplies that entry by multiplier. After all operations, reduce every entry modulo 10^9 + 7. Return the final array in its original index order; the modulo is applied after the selection operations.
Source: Final Array State After K Multiplication Operations II on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
nums = [2,1,3,5,6], k = 5, multiplier = 2
[8,4,6,5,6]
# Example 2
nums = [100000,2000], k = 2, multiplier = 1000000
[999999307,999999993]
Constraints
Related LeetCode Problems
Practice more problems similar to Final Array State After K Multiplication Operations II.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.