Skip to content

Commit de63b36

Browse files
committed
modify code
1 parent f706ad5 commit de63b36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/topinterviewquestions/Problem_0387_FirstUniqueCharacterInString.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public int firstUniqChar(String s) {
99
for (int i = 0; i < N; i++) {
1010
count[str[i] - 'a']++;
1111
}
12-
for (int i = 0; i < s.length(); i++) {
12+
for (int i = 0; i < N; i++) {
1313
if (count[str[i] - 'a'] == 1) {
1414
return i;
1515
}

0 commit comments

Comments
 (0)