/***Definitionforsingly-linkedlist.*structListNode{*intval;*ListNode*next;*ListNode(intx):val(x),next(NULL){}*};*///以下是正确的代码classSolution{
public:
ListNode*addTwoNumbers(ListNode*l1,ListNode*l2){
ListNode*p=l1,*q=l2;
intvalue1,t=0;
value1=p->val+..
分类:
其他好文 时间:
2015-05-24 06:39:48
阅读次数:
143
Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values. 1 #incl...
分类:
其他好文 时间:
2015-05-23 21:23:55
阅读次数:
231
题目:Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For e...
分类:
其他好文 时间:
2015-05-21 07:48:16
阅读次数:
114
正则化方法:L1和L2 regularization、数据集扩增、dropout本文是《Neural networks and deep learning》概览中第三章的一部分,讲机器学习/深度学习算法中常用的正则化方法。(本文会不断补充)正则化方法:防止过拟合,提高泛化能力在训练数据不够多时,或者...
分类:
其他好文 时间:
2015-05-19 22:09:23
阅读次数:
230
Lecture 7: Lists and mutability,dictionaries,pseudocode,introduction to efficiency 列表及可变性,字典,伪代码,效率Lists and mutability 列表及可变性>>> L1 = [1, 2, 3]
>>> L2 = L1
>>> print L2
[1, 2, 3]
>>> L1[0] = 4
>>> pri...
分类:
编程语言 时间:
2015-05-19 19:07:01
阅读次数:
149
Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For exam...
分类:
其他好文 时间:
2015-05-19 07:11:50
阅读次数:
96
处理器的乱序和并发执行目前的高级处理器,为了提高内部逻辑元件的利用率以提高运行速度,通常会采用多指令发射、乱序执行等各种措施。现在普遍使用的一些超标量处理器通常能够在一个指令周期内并发执行多条指令。处理器从L1 I-Cache预取了一批指令后,就会分析找出那些互相没有关联可以并发执行的指令,然后送到...
分类:
其他好文 时间:
2015-05-18 20:45:47
阅读次数:
221
RAID技术磁盘阵列1.mdadm-C/dev/md0-ayes-l1-n2-x1/dev/vdb{1..3}创建名为/dev/md0的md设备options:1)-C:创建md设备2)-l:选择模式2)-n:多少块设备4)-x:多少块备份模式类别:①模式0,单纯地提升设备运行速度,但如果其中一个坏了,所有数据都损坏。相当于两个设备为一个设..
分类:
其他好文 时间:
2015-05-18 01:18:59
阅读次数:
126
磁盘阵列1.mdadm-C/dev/md0-ayes-l1-n2-x1/dev/vdb{1..3}创建名为/dev/md0的md设备options:1)-C:创建md设备2)-l:选择模式2)-n:多少块设备4)-x:多少块备份模式类别:①模式0,单纯地提升设备运行速度,但如果其中一个坏了,所有数据都损坏。相当于两个设备为一个设备工作,..
分类:
其他好文 时间:
2015-05-18 01:16:20
阅读次数:
146
ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { if (l1 == NULL) return l2; if (l2 == NULL) return l1; ListNode *ret = NULL; ...
分类:
其他好文 时间:
2015-05-17 18:34:48
阅读次数:
95