Hashmap || Simplest Code || C++|| Short || Clean
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    #define ll long long        \n    int bestRotation(vector<int>& nums) {\n        ll n=nums.size(),total=0,answer=INT_MIN,current,ans=0;\n        unordered_map<ll,ll>mp;\n        for(ll i=0;i<n;i++){\n            if(nums[i]<=i){\n                mp[i-nums[i]]++;\n                total++;\n            }\n        }\n        answer=total;\n        current=total;\n        for(ll i=1;i<n;i++){\n            current-=mp[i-1];\n            current++;\n            mp[n-1-nums[i-1]+i]++;\n            // cout<<current<<endl; //\n            if(current>answer){\n                answer=current;\n                ans=i;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']