C++ || easy solution with 1 for loop + explanation
class Solution {\npublic:\n     int smallestEqual(vector& nums) \n    {\n*         int ans=INT_MAX;\n        for(int i=0;i<nums.size();i++)\n        {\n        
class Solution {\npublic:\n     int smallestEqual(vector<int>& nums) \n    {\n*         int ans=INT_MAX;\n        for(int i=0;i<nums.size();i++)\n        {\n            if(i%10==nums[i])\n            {\n                ans = min(ans,i);\n            }\n        }\n        if(ans==INT_MAX)\n        {\n            return -1;\n        }\n        return ans;\n    }\n}
[]