We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
container[i] >= 0时,container[i]对应字符在字符串中的下标,所以实际使用时 minIndex = [传入的字符串长度或者无穷大]。 哈哈哈,当然这里不涉及具体问题,思路正确。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
function FirstAppearingOnce() {
let minIndex = 256;
let strIndex = 0;
for (let i = 0; i < 256; i++) {
if (container[i] >= 0 && container[i] < minIndex) {
minIndex = container[i];
strIndex = i;
}
}
return minIndex === 256 ? '#' : String.fromCharCode(strIndex);
}
container[i] >= 0时,container[i]对应字符在字符串中的下标,所以实际使用时 minIndex = [传入的字符串长度或者无穷大]。
哈哈哈,当然这里不涉及具体问题,思路正确。
The text was updated successfully, but these errors were encountered: