We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3b677b commit 66c54f2Copy full SHA for 66c54f2
lcof/面试题50. 第一个只出现一次的字符/README.md
@@ -200,17 +200,17 @@ class Solution {
200
func firstUniqChar(_ s: String) -> Character {
201
var count = [Int](repeating: 0, count: 26)
202
let aAsciiValue = Int(Character("a").asciiValue!)
203
-
+
204
for char in s {
205
count[Int(char.asciiValue!) - aAsciiValue] += 1
206
}
207
208
209
if count[Int(char.asciiValue!) - aAsciiValue] == 1 {
210
return char
211
212
213
214
return " "
215
216
0 commit comments