3550. Smallest Index With Digit Sum Equal to Index
You are given an integer array
nums.Return the smallest index
isuch that the sum of the digits ofnums[i]is equal toi.If no such index exists, return
-1.
1 | func smallestIndex(nums []int) int { |