Skip to content

Commit 5c248e9

Browse files
committed
modify code
1 parent 4f37768 commit 5c248e9

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
@@ -5,7 +5,7 @@ public class Problem_0387_FirstUniqueCharacterInString {
55
public int firstUniqChar(String s) {
66
char[] str = s.toCharArray();
77
int N = str.length;
8-
int count[] = new int[256];
8+
int count[] = new int[26];
99
for (int i = 0; i < N; i++) {
1010
count[str[i] - 'a']++;
1111
}

0 commit comments

Comments
 (0)