You are given an integer array nums and an integer value.
In an operation, you can add or subtract value to or from any element of nums. This operation can be applied any number of times to any element.
Return the maximum MEX (minimum excluded value) of nums that can be obtained after applying any number of operations.
Note: The MEX of an array is the smallest integer greater than or equal to
that is not present in the array.
Constraints:
nums.length, value
nums[i]
You are given an integer array nums and an integer value.
In an operation, you can add or subtract value to or from any element of nums. This operation can be applied any number of times to any element.
Return the maximum MEX (minimum excluded value) of nums that can be obtained after applying any number of operations.
Note: The MEX of an array is the smallest integer greater than or equal to
that is not present in the array.
Constraints:
nums.length, value
nums[i]