Tap here to switch tabs
Problem
Submissions

Problem: Smallest Index With Equal Value

Smallest Index With Equal Value asks you to find the first zero-based array position whose value matches the position's remainder after division by ten, or return -1 if none does.

Statement

Given a 00 indexed integer array nums, return the smallest index i of nums such that i  mod 10\bmod 10 is equal to nums[i]. If no such index exists, return −1-1.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 0≤0 \leq nums[i] ≤9\leq 9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Smallest Index With Equal Value

Smallest Index With Equal Value asks you to find the first zero-based array position whose value matches the position's remainder after division by ten, or return -1 if none does.

Statement

Given a 00 indexed integer array nums, return the smallest index i of nums such that i  mod 10\bmod 10 is equal to nums[i]. If no such index exists, return −1-1.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 0≤0 \leq nums[i] ≤9\leq 9