Without Modular operator | follow-up question
With modulus it\'s easy, here is without modulus\n\nclass Solution {\n    public int smallestEqual(int[] nums) {\n        int index = 0;\n        for (int i = 0
**With modulus it\'s easy, here is without modulus**\n```\nclass Solution {\n    public int smallestEqual(int[] nums) {\n        int index = 0;\n        for (int i = 0 ; i < nums.length; i++) {\n            if (index == nums[i]) {\n                return i;\n            }\n            if (++index== 10) {\n               index = 0;\n            }\n        }\n        return -1;\n    }\n}\n```\n
['Java']