当前位置:网站首页>【剑指offer】面试题50:第一个只出现一次的字符——哈希表查找
【剑指offer】面试题50:第一个只出现一次的字符——哈希表查找
2022-07-27 14:24:00 【Jocelin47】

class Solution {
public:
char firstUniqChar(string s) {
//unordered_map<char, int> freq;
int freq[256]= {
0};
for(char ele: s)
freq[ele]++;
for(char ele: s)
if(freq[ele]== 1)
return ele;
return ' ';
}
};
边栏推荐
- STM32 can -- can ID filter analysis
- Leetcode 781. rabbit hash table in forest / mathematical problem medium
- With just two modifications, apple gave styleganv2 3D generation capabilities
- Design scheme of digital oscilloscope based on stm32
- Unity3d learning note 10 - texture array
- 《剑指Offer》剪绳子
- Spark TroubleShooting整理
- Inside router of network equipment hard core technology (10) disassembly of Cisco asr9900 (4)
- npm install错误 unable to access
- Sword finger offer merges two sorted linked lists
猜你喜欢

With just two modifications, apple gave styleganv2 3D generation capabilities

QT (IV) mixed development using code and UI files

EMC design scheme of CAN bus

Leetcode 190. reverse binary bit operation /easy

MySQL interview 40 consecutive questions, interviewer, if you continue to ask, I will turn my face

Watermelon book machine learning reading notes Chapter 1 Introduction
USB interface electromagnetic compatibility (EMC) solution

Leetcode 74. search two-dimensional matrix bisection /medium

What is the breakthrough point of digital transformation in the electronic manufacturing industry? Lean manufacturing is the key

Spark 本地程序启动缓慢问题排查
随机推荐
Network equipment hard core technology insider router Chapter 21 reconfigurable router
Deveco studio2.1 operation item error
Leetcode 781. rabbit hash table in forest / mathematical problem medium
Unity性能优化------渲染优化(GPU)之Occlusion culling(遮挡剔除)
How to package AssetBundle
HaoChen CAD building 2022 software installation package download and installation tutorial
使用解构交换两个变量的值
DIY ultra detailed tutorial on making oscilloscope: (1) I'm not trying to make an oscilloscope
JMeter recording interface automation
Lua study notes
适配验证新职业来了!华云数据参与国家《信息系统适配验证师国家职业技能标准》编制
md 中超链接的解析问题:解析`this.$set()`,`$`前要加空格或转义符 `\`
RS485接口的EMC设计方案
修改 Spark 支持远程访问OSS文件
EMC design scheme of RS485 interface
Is it safe to open an account on a mobile phone?
Leetcode 240. search two-dimensional matrix II medium
Unity performance optimization ----- drawcall
STM32F10x_硬件I2C读写EEPROM(标准外设库版本)
Reading notes of lifelong growth (I)