Solution in c
IntuitionApproachComplexity
Time complexity:

Space complexity:
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)$$ -->

# Code
```c []
int minimumRightShifts(int* nums, int numsSize) {
  int count=0,index;
  for(int i=0;i<numsSize-1;i++)
  {
    if(nums[i]>nums[i+1])
    {
        count++;
        index=i+1;
    }
  }
  if(nums[numsSize-1]>nums[0]&&count!=0)
  
    count++;
  
  if(count>1)
  return -1;
  if(count==0)
  
    return 0;
  
  return numsSize-index;
}
```
['C']