We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9283c2 commit 323b9dcCopy full SHA for 323b9dc
2057-smallest-index-with-equal-value.js
@@ -0,0 +1,11 @@
1
+/**
2
+ * @param {number[]} nums
3
+ * @return {number}
4
+ */
5
+var smallestEqual = function(nums) {
6
+ const n = nums.length
7
+ for(let i = 0; i < n; i++) {
8
+ if(i % 10 === nums[i]) return i
9
+ }
10
+ return -1
11
+};
0 commit comments