No387FirstUniqueCharacterInAString
来源:互联网 发布:sqlserver 认证 编辑:程序博客网 时间:2024/06/06 05:06
思路
- First one is two loops to find. Two pointers.
- Logic Loopholes
- String s = “z”
- Only compares the i behind is not right. You have to check every one
- not time efficient
- Logic Loopholes
- Second thought, inspired by others, use frequency
- Logic Loophole: after the frequency is got. you have to return the index of the character, not the character itself
- Third thought is the optimization of the second thought. use just one loop
- Forth, use bitMap
- Fifth, Use map and set together
0 0
- No387FirstUniqueCharacterInAString
- Nois 12.0如何生成release版本
- dfiuhdfkdfbjhdfbg
- android计算当前缓存大小与清除功能
- Java中的synchronized关键字
- 使用net send命令在局域网内发消息
- No387FirstUniqueCharacterInAString
- 为什么说中小公司自建Redis是一件不太靠谱的事情?
- 读入优化
- 算法导论之寻找最大子数组
- 图论 最大团,最大独立集
- maven+springmvc+dubbozookeeper
- 优雅地为RecyclerView加上头部、下拉刷新、自动加载
- Java Map 按Key排序
- shell 和 python3 :Word Frequency(leetcode192-t11.sh)