Skip to content

Commit b8bf1d8

Browse files
add 2057
1 parent a2213ae commit b8bf1d8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag
1010
|-----|----------------|---------------|--------|-------------|-------------
11+
|2057|[Smallest Index With Equal Value](https://leetcode.com/problems/smallest-index-with-equal-value/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2057.java) ||Easy||
1112
|2055|[Plates Between Candles](https://leetcode.com/problems/plates-between-candles/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2055.java) ||Medium||
1213
|2054|[Two Best Non-Overlapping Events](https://leetcode.com/problems/two-best-non-overlapping-events/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2054.java) ||Medium||
1314
|2053|[Kth Distinct String in an Array](https://leetcode.com/problems/kth-distinct-string-in-an-array/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2053.java) ||Easy||
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.fishercoder.solutions;
2+
3+
public class _2057 {
4+
public static class Solution1 {
5+
public int smallestEqual(int[] nums) {
6+
for (int i = 0; i < nums.length; i++) {
7+
if (i % 10 == nums[i]) {
8+
return i;
9+
}
10+
}
11+
return -1;
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)