Tap here to switch tabs
Problem
Submissions

Problem: Smallest Index With Equal Value

med
30 min
Try to solve the Smallest Index With Equal Value problem.

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

med
30 min
Try to solve the Smallest Index With Equal Value problem.

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