题目
剑指 Offer 50. 第一个只出现一次的字符
在字符串 s 中找出第一个只出现一次的字符。如果没有,返回一个单空格。 s 只包含小写字母。
示例 1:
1 | 输入:s = "abaccdeff" |
示例 2:
1 | 输入:s = "" |
限制:
1 | 0 <= s 的长度 <= 50000 |
代码
Go:哈希表映射,map没有顺序
1 | func firstUniqChar(s string) byte { |
致力于分享编程知识的博客
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true