C++
文章平均质量分 73
zjajgyy
这个作者很懒,什么都没留下…
展开
-
【C++】一些好用的方法
1. 计算二进制n有几个1:while(n){ count++; n = n&(n-1);}_builtin_popcount(n)2. bitset: bitset类的使用与简介3. 大小写转换:tolower(char tmp)和toupper(char tmp)4. 返回某个字符的下标位置:string.find('a')5.原创 2017-04-01 11:20:45 · 229 阅读 · 0 评论 -
【C++】【LeetCode】【指针】2. Add Two Numbers
Add Two NumbersYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two原创 2017-04-01 11:40:01 · 263 阅读 · 0 评论 -
【C++】【总结】unordered_map,unordered_set,map和set的用法和区别
unordered_map头文件:#include介绍:std::unordered_map 本来就是以key来查找value而设计。方法:Insert原创 2017-03-25 11:30:26 · 42099 阅读 · 10 评论