Python3, Simple BruteForce
Code\n\nclass Solution:\n    def minimumRightShifts(self, nums: List[int]) -> int:\n        i=nums.index(max(nums))\n        if sorted(nums)==nums[i+1:]+nums[:i
# Code\n```\nclass Solution:\n    def minimumRightShifts(self, nums: List[int]) -> int:\n        i=nums.index(max(nums))\n        if sorted(nums)==nums[i+1:]+nums[:i+1]:\n            return len(nums)-i-1\n        return -1         \n```\n# Code Without Sort\n```\nclass Solution:\n    def minimumRightShifts(self, nums: List[int]) -> int:\n        i=nums.index(max(nums))\n        nums=nums[i+1:]+nums[:i+1]\n        for j in range(len(nums)-1):\n            if nums[j+1]<nums[j]:\n                return -1\n        return len(nums)-i-1\n```
['Python3']