摘要: 1、面向对象的核心概念:封装,继承,多态 2、结构变量的每个成员都会占据不同的内存单元,而联合变量的每个成员都共享同样的内存单元。即一个联合变量的大小实际上是他占内存最多的那个成员的大小。 3、malloc和free的不足: malloc参数是以字节计的内存大小,程序员需要自己计算待分配单元的字节数 阅读全文
posted @ 2018-10-11 15:01 热之雪 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 对于大多数子字符串问题,我们获得一个字符串和需要寻找一个符合条件的子字符串。一个通常的解法是使用hashmap来关联两个指针,接下来是模板: 思路: 使用count作为匹配数 对于单个字符串匹配问题,直接用一个窗口滑动,右窗滑动并更改count值,使count值符合完全匹配条件;左窗滑动令count 阅读全文
posted @ 2018-10-06 21:56 热之雪 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 350. Intersection of Two Arrays II 345. Reverse Vowels of a String 387. First Unique Character in a String 409. Longest Palindrome 412. Fizz Buzz 414. 阅读全文
posted @ 2018-10-06 12:37 热之雪 阅读(236) 评论(0) 推荐(0) 编辑
摘要: C++引入了ostringstream、istringstream、stringstream这三个类,要使用他们创建对象就必须包含<sstream>这个头文件。 istringstream类用于执行C++风格的串流的输入操作。 ostringstream类用于执行C风格的串流的输出操作。 strst 阅读全文
posted @ 2018-10-04 10:23 热之雪 阅读(8984) 评论(0) 推荐(0) 编辑
摘要: 235. Lowest Common Ancestor of a Binary Search Tree 公共的祖先必定大于左点小于右点,否则不断递归到合适。 257. Binary Tree Paths 258. Add Digits 263. Ugly Number 268. Missing Nu 阅读全文
posted @ 2018-10-04 10:20 热之雪 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 198. House Robber 相邻不能打劫,取利益最大化。 思想:当前值和前一个和的总数 与 前一个和 做大小比较,取最大值,重复该步骤。 202. Happy Number 204. Count Primes 思路:在i × i 的基础上递进 i,这些都不是素数; 219. Contains 阅读全文
posted @ 2018-10-03 13:24 热之雪 阅读(248) 评论(0) 推荐(0) 编辑
摘要: LeNet5 论文:http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf LeNet-5:是Yann LeCun在1998年设计的用于手写数字识别的卷积神经网络,当年美国大多数银行就是用它来识别支票上面的手写数字的,它是早期卷积神经网络中最有代表性的 阅读全文
posted @ 2018-10-01 11:31 热之雪 阅读(20007) 评论(1) 推荐(0) 编辑
摘要: 66、Plus One Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most s 阅读全文
posted @ 2018-09-05 23:57 热之雪 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 111122333类似这字符串的分类 阅读全文
posted @ 2018-09-04 16:40 热之雪 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 38、Count and Say The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is r 阅读全文
posted @ 2018-09-04 16:38 热之雪 阅读(137) 评论(0) 推荐(0) 编辑