Class Solution

  • All Implemented Interfaces:

    
    public final class Solution
    
                        

    3264 - Final Array State After K Multiplication Operations I\.

    Easy

    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.

    Example 1:

    Input: nums = 2,1,3,5,6, k = 5, multiplier = 2

    Output: 8,4,6,5,6

    Explanation:

    Example 2:

    Input: nums = 1,2, k = 3, multiplier = 4

    Output: 16,8

    Explanation:

    Constraints:

    • 1 <= nums.length <= 100

    • 1 <= nums[i] <= 100

    • 1 <= k <= 10

    • 1 <= multiplier <= 5

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Solution()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final IntArray getFinalState(IntArray nums, Integer k, Integer multiplier)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait