Simple solution on Swift
Code\n\nclass Solution {\n    func smallestEqual(_ nums: [Int]) -> Int {\n        for i in 0..<nums.count where i % 10 == nums[i] {\n            return i\n     
# Code\n```\nclass Solution {\n    func smallestEqual(_ nums: [Int]) -> Int {\n        for i in 0..<nums.count where i % 10 == nums[i] {\n            return i\n        }\n        return -1\n    }\n}\n```\n### Please upvote if you found the solution useful!
['Swift']