2057. Smallest Index With Equal Value

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2057

class Solution:
    def smallestEqual(self, nums: List[int]) -> int:
        for i, v in enumerate(nums):
            if i % 10 == v:
                return i
        return -1