👇公众号👇---👇 微信 👇
欢迎大家私信&加群交流
Appearance
s = "abaccdeff" 返回 "b" s = "" 返回 " "
/** * @param {string} s * @return {character} */ var firstUniqChar = function (s) { let map = {} for (c of s) { if (map[c]) { map[c]++; } else { map[c] = 1 } } for (c of s) { if (map[c] === 1) { return c } } return ' ' };
题链