会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
牧马人夏峥
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
30
31
32
33
34
35
36
37
38
···
62
下一页
2016年8月16日
容器和泛型
摘要: 参考:http://www.cnblogs.com/ronny/p/cpp_primer_03.html 容器包括顺序容器和关联容器。其中,顺序容器包括vector,list,deque。 关联容器包括map,set。
阅读全文
posted @ 2016-08-16 15:10 牧马人夏峥
阅读(121)
评论(0)
推荐(0)
2016年8月14日
多层神经网络与C++实现
摘要: BP理论部分参考:http://blog.csdn.net/itplus/article/details/11022243 参考http://www.cnblogs.com/ronny/p/ann_02.html#!comments,结合BP算法的理论部分,可以真正理解了ANN。 代码部分我加了部分
阅读全文
posted @ 2016-08-14 17:41 牧马人夏峥
阅读(458)
评论(0)
推荐(0)
2016年8月12日
反向传导算法的推导
摘要: 参考:http://blog.csdn.net/itplus/article/details/11022243 http://www.offconvex.org/2016/12/20/backprop/
阅读全文
posted @ 2016-08-12 10:27 牧马人夏峥
阅读(148)
评论(0)
推荐(0)
2016年8月8日
sizeof()和strlen()的区别与联系
摘要: 参考:http://www.cnblogs.com/carekee/articles/1630789.html 1、sizeof是运算符,其值在编译时即计算好了,参数可以是数组、指针、类型、对象、函数等。 2、strlen()是函数,要在运行时才能计算,参数必须是字符型指针(char*)。当数组名作
阅读全文
posted @ 2016-08-08 16:24 牧马人夏峥
阅读(150)
评论(0)
推荐(0)
Pascal’s Triangle
摘要: vector<vector<int>> generate(int num) { vector<vector<int>> result; vector<int> array; for (int i = 1; i <= num; i++) { for (int j = i - 2; j > 0; j--
阅读全文
posted @ 2016-08-08 10:49 牧马人夏峥
阅读(95)
评论(0)
推荐(0)
Multiply Strings
摘要: 思路很简单,将string转为int,计算完后再转为string,但要简洁的实现起来并不容易。 typedef vector<int> bigint; bigint make_bigint(string const& s) { //将字符串转为vector<int> bigint n; //将s中的
阅读全文
posted @ 2016-08-08 09:46 牧马人夏峥
阅读(143)
评论(0)
推荐(0)
2016年8月2日
Minimum Window Substring
摘要: 这题还是很有难度的。通过数组记录元素的长度,将目标数组与其进行比较,再对相应的子串进行缩小,并记录相应的起点与长度。 提取包含子串的最小窗口,可以是无序的。 1、建立一个256个大小的ASCII数组,统计子串中每个字符出现的次数; 2、用两个指针,一个指针表示窗口的起始位置,一个不断后移直至这个窗口
阅读全文
posted @ 2016-08-02 15:55 牧马人夏峥
阅读(184)
评论(0)
推荐(0)
Insert Interval
摘要: struct Interval{ int start; int end; Interval() :start(0), end(0){} Interval(int s, int e) :start(s), end(e){} }; vector<Interval> insert(vector<Inter
阅读全文
posted @ 2016-08-02 14:34 牧马人夏峥
阅读(119)
评论(0)
推荐(0)
Palindrome Number
摘要: bool isPalindrome(int x) { if (x < 0)return false; // int d = 1; while (x / d >= 10)d *= 10; while (x>0) { int p = x / d;//取首位 int q = x % 10;//取末位 if
阅读全文
posted @ 2016-08-02 14:33 牧马人夏峥
阅读(95)
评论(0)
推荐(0)
Reverse Integer
摘要: int reverse(int x) { int r = 0; for (; x; x /= 10) { r = r * 10 + x % 10; } }
阅读全文
posted @ 2016-08-02 14:32 牧马人夏峥
阅读(84)
评论(0)
推荐(0)
上一页
1
···
30
31
32
33
34
35
36
37
38
···
62
下一页
公告