You are given an integer array nums and an integer k.
Rotate only the non negative elements of nums to the left by k positions, while preserving the relative positions and indices of all negative elements.
Return the modified array after performing the rotation.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
Rotate only the non negative elements of nums to the left by k positions, while preserving the relative positions and indices of all negative elements.
Return the modified array after performing the rotation.
Constraints:
nums.length
nums[i]
k