0ms Beats 100 % in Time & Memory , GO
Intuition\nFirst Am searching for how many time list is broken sort,\n   If its more then 1 its not possible to sort it so -1\n   If its 0 already sorted so 0\n
# Intuition\nFirst Am searching for how many time list is broken sort,\n   If its more then 1 its not possible to sort it so **-1**\n   If its 0 already sorted so **0**\n   Last condition ```if last index > 0 index``` so its again **-1**\n   Otherwise **Minus** First break Point from length is **Answer**\n\n\n\n\n# Code\n```\nfunc minimumRightShifts(nums []int) int {\n    result := 0;\n    brk := 0; //How many breaks , if breaks are > 1 return -1;\n    for i:=0;i<len(nums)-1;i++ {\n        if(nums[i] > nums[i+1]) {\n            if(result == 0) {\n             result = len(nums)-i-1;\n            }\n            brk +=1 \n        }\n    }\n    if(brk > 0) {\n         if brk > 1 || nums[len(nums)-1] > nums[0] {\n             return -1;\n         }  else {\n             return result\n         }\n    }\n    return result\n}\n```
['Go']