Skip to content

Commit 34c60f0

Browse files
committed
solution of the issue problem
1 parent 4f148b3 commit 34c60f0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

solution/1300-1399/1394.Find Lucky Integer in an Array/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class Solution:
106106
class Solution {
107107
public int findLucky(int[] arr) {
108108
int[] cnt = new int[510];
109-
for (int x : cnt) {
110-
++cnt[x];
109+
for (int x : arr) {
110+
cnt[x]++;
111111
}
112112
int ans = -1;
113113
for (int x = 1; x < cnt.length; ++x) {

solution/1300-1399/1394.Find Lucky Integer in an Array/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class Solution:
9090
class Solution {
9191
public int findLucky(int[] arr) {
9292
int[] cnt = new int[510];
93-
for (int x : cnt) {
94-
++cnt[x];
93+
for (int x : arr) {
94+
cnt[x]++;
9595
}
9696
int ans = -1;
9797
for (int x = 1; x < cnt.length; ++x) {

solution/1300-1399/1394.Find Lucky Integer in an Array/Solution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class Solution {
22
public int findLucky(int[] arr) {
33
int[] cnt = new int[510];
4-
for (int x : cnt) {
5-
++cnt[x];
4+
for (int x : arr) {
5+
cnt[x]++;
66
}
77
int ans = -1;
88
for (int x = 1; x < cnt.length; ++x) {

0 commit comments

Comments
 (0)