Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
List* mergeTwoLists(List* l1,List* l2)
{
List* head ...
分类:
其他好文 时间:
2015-04-13 11:01:03
阅读次数:
110
abc def l1 l1 l1 hjkul{ list-style-type: none;}.left, .middle,.right{ float:left; width:120px...
分类:
Web程序 时间:
2015-04-10 17:31:23
阅读次数:
127
def union_list(l1, l2): result = [] if not l1: result.extend(l2) return result if not l2: result.extend(l1) retur...
分类:
其他好文 时间:
2015-04-09 19:33:46
阅读次数:
100
OpenMesh 提供了许多可供使用的向量操作函数,使用特别方便。计算距离:从官方文档可以看到OpenMesh提供了5个函数,分别为Scalar length() const //compute euclidean normScalar norm() const //compute e...
分类:
其他好文 时间:
2015-04-08 14:57:06
阅读次数:
165
1.题目描述:点击打开链接
2.解题思路:本题利用霍夫曼编码的原理解决。这道题本可以用动态规划来解决,之前已经在UVa10003上做过了这道题,不过今天才发现原来就是霍夫曼编码的变形,真的是非常巧妙。我们考察切木棍这个过程可以发现,实际上这把总长为L的木棍切割为L1,L2,L3等等我们需要的木棍是一个树状结构。那么最终的总开销就是sum{木板的长度*节点的深度}。从最优的角度考虑,最短的板对应的...
分类:
其他好文 时间:
2015-04-07 09:57:30
阅读次数:
111
很简单public class Solution { public ListNode mergeTwoLists(ListNode l1, ListNode l2) { ListNode h = new ListNode(-1); ListNode l3 = h; ...
分类:
其他好文 时间:
2015-04-07 07:07:20
阅读次数:
120
Shooting算法是Wenjiang提出的一种优化Lasso(L1 Regularization)和Bridge Regression的算法, 本文以Lasso为例.对于线性回归问题$\mathbb{y}=X\mathbb{\beta}+\epsilon$, 普通最小二乘法(OLS, ordina...
分类:
其他好文 时间:
2015-04-06 15:39:06
阅读次数:
175
前面两篇回归(一)(二)复习了线性回归,以及L1与L2正则——lasso和ridge regression。特别描述了lasso的稀疏性是如何产生的。在本篇中介绍一下和lasso可以产生差不多效果的两种方法:stagewise和LARS...
分类:
其他好文 时间:
2015-04-06 14:15:37
阅读次数:
3088
介绍指针是内存单元的编号,地址就是指针。一句话通过指针和指针变量 可以在不同函数间 间接 对数据进行操作快速入门 int * p:p是变量名,p变量的数据类型是int * 类型,所谓int * 类型实际就是存放int变量地址的类型,不表示定义了一个名字叫*p的变量 &i: & 取地址运算符,这里.....
分类:
其他好文 时间:
2015-04-04 22:35:02
阅读次数:
176
Case 1:
使用推荐的配置
learning_rate = 0.01
L1_reg = 0.00
L2_reg=0.0001
n_epoches=1000
batch_size=20
n_hidden=500
实验结果:
实验耗时:
Case 2:
自己中间加入两个隐含层,分别为400 和 300 个节点。实验配置如下:
learn...
分类:
其他好文 时间:
2015-04-03 19:29:53
阅读次数:
218