class Solution {
public char repeatedCharacter(String s) {
char[] chars = s.toCharArray();
int[] f = new int[30];
for (int i = 0; i < s.length(); i++) {
f[chars[i]-'a']++;
if (f[chars[i]-'a'] > 1) return chars[i];
}
return chars[0];
}
}
标签:return,int,字母,两次,char,2351,chars
From: https://www.cnblogs.com/eiffelzero/p/17019131.html