Smallest Index With Equal Value 🧑‍💻🧑‍💻 || JAVA solution code 💁💁...
Code\n\nclass Solution {\n    public int smallestEqual(int[] nums) {\n        int ans = 0;\n        int temp = 0;\n        int n = 0;\n        for(int i=0; i<nu
# Code\n```\nclass Solution {\n    public int smallestEqual(int[] nums) {\n        int ans = 0;\n        int temp = 0;\n        int n = 0;\n        for(int i=0; i<nums.length; i++){\n            if(i%10 == nums[i]){\n                temp = i;\n\n                if(n == 0){\n                    ans = i;\n                    n++;\n                }\n                \n                if(ans > temp){\n                    ans = temp;\n                }\n\n            }\n        }\n        if(n != 0){\n            return ans;\n        }\n        return -1;\n    }\n}\n```
['Java']