Easy soln :)
IntuitionApproachComplexity
Time complexity:

Space complexity:
If u like my soln, upvote me.Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
If u like my soln, upvote me.
# Code
```cpp []
class Solution {
public:
    int minimumRightShifts(vector<int>& nums) {
//copy the vector into new arr for comparision purpose.
        vector<int> nn;
        nn = nums;
        sort(nn.begin(),nn.end());
        int n=nums.size();
        if(nn==nums) return 0;
        

        for(int count =1;count<n;count++){
            int last = nums[n-1];//stroe last element as right shifting will make this element loose.
            for(int i=n-1;i>0;--i){
                nums[i]=nums[i-1];//perform right shift
            }
            nums[0]=last;
            if(nums==nn){//if equals the sorted arr return the no of right shifts
            return count;
            }
        }
        
        return -1;
        
    }
};
```
![d9a30a34-57a0-40f1-adab-43bec86a259a_1723795301.0363479.png](https://assets.leetcode.com/users/images/ef4c0397-0f97-4cd4-84d8-c0be1cdbb354_1735840565.0609462.png)

['C++']