Simple Java Approach
Intuition\n Describe your first thoughts on how to solve this problem. \nThe question is to find the minimum number of right shifts required to get the List in 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nThe question is to find the minimum number of right shifts required to get the List in sorted order. So, if we can find whether the List is rotatable it\'ll be easy to find the minimum rotations required.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nStep -1 : Check whether the list becomes sorted if we rotate.\nStep -2: Find Minimum number of rotations required to rotate\n\nFor Step -1:\nWe\'ll check all the possibilities of List not being rotatable.\nFor Step -2:\nWe\'ll find the minimum rotations using the minimum value\'s index.\nLook into the code for better understading.\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int minimumRightShifts(List<Integer> nums) {\n        int len = nums.size();\n        //If length of List = 1 no need to do rotations\n        if(len==1) return 0;\n        // find min value\n        int min = Integer.MAX_VALUE;\n        for (int i = 0; i < len; i++) {\n            min = Math.min(min, nums.get(i));\n        }\n        //find index of min value\n        int minI = 0;\n        for (int i = 0; i < len; i++) {\n            if (nums.get(i) == min) {\n                minI = i;\n            }\n        }\n        //Find all the possibilties of Array not rotatable \n        //The List must be in sorted order from 0th index to min value(excluding min) and must be in sorted order from minimum to end\n        for (int i = minI + 1; i < nums.size(); i++) {\n            if (nums.get(i) < nums.get(i - 1)) {\n                return -1;\n            }\n        }\n        // The left part of array must contain greater values than right part of array to rotate it to the right\n        //To check this condition, we check the max value from right part with all the left part values\n        for (int i = 0; i < minI; i++) {\n            if (i == 0) {\n                if (nums.get(i) < nums.get(nums.size() - 1)) {\n                    return -1;\n                }\n            }\n            else if (nums.get(i) < nums.get(i - 1)) {\n                return -1;\n            }\n        }\n        //It satisfied all the conditions so it can be rotated\n        //minimum right shifts required will be shifting it from the min value\n        //modulo is just to cover the condition of min at 0th index\n        return (nums.size()-minI)%nums.size();\n    }\n}\n```
['Java']