![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
kasdlj
sdaad
展开
-
在线笔试题汇总 4.12
在线笔试题汇总。4.12日原创 2016-04-12 21:18:16 · 501 阅读 · 0 评论 -
暗黑计划-字符串
1.字符串string 1.1 字符串长度 string s int s_len = strlen(s.c_str()); 1.2 截取字符串的一部分 string word = s.substr(起始, 长度); 2.map映射,统计字符串个数的时候可以使用 mapstring, int> word_count; vectorstring>&原创 2016-08-26 10:23:29 · 1180 阅读 · 0 评论 -
[leetcode] 347. Top K Frequent Elements
Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may assume k is always valid, 1 ≤ k ≤ number原创 2016-06-23 11:30:03 · 373 阅读 · 0 评论 -
【LeetCode】103. Binary Tree Zigzag Level Order Traversal
【LeetCode】103. Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next原创 2016-06-22 20:44:56 · 357 阅读 · 0 评论 -
SGD,Adam,AdaGrad等优化算法
SGD 无动量,下降慢,会陷入局部最优点 SGD with Momentum 有一个动量,一般值为0.9,即0.9的程度考虑以往的方向,0.1程度考虑当前梯度方向。类似高速上开车,大方向不变的同时,微调方向。 SGD_NAG 万一你陷入局部最优怎么办,周围都是略高的山,所以要爬上去,才能看到更广阔的的世界 因此,某个时刻,不计算当前的梯度方向,跟着历史动量走一步,走完之后再根据下一点的原创 2018-01-26 16:23:39 · 1081 阅读 · 0 评论