class Count{ public int Count(String a){ int n = a.length(); int result = 0; int num = 0; int p = 0; int L1 = a.indexOf('('); int R1 = a.inde...
分类:
编程语言 时间:
2015-06-09 16:42:58
阅读次数:
125
http://www.chioka.in/differences-between-l1-and-l2-as-loss-function-and-regularization/这里分别对l1 loss, l2 loss做了解释,以及对l1 regularization, l2 regularizati...
分类:
其他好文 时间:
2015-06-08 21:27:33
阅读次数:
138
题目:现有两个递增的单链表L1和L2,设计一个算法将L1与L2的所有结点归并到递增的单链表L3中。要求:空间复杂度为O(1)。思路:本题可采用二路归并思路,但题目要求空间复杂度为O(1),因此不能复制结点,只能破坏L1和L2将结点插入到L3中。代码:void Merge(LinkList &L1,LinkList &L2,LinkList &L3)
{
LinkList *p=L1.head...
分类:
编程语言 时间:
2015-06-07 18:55:19
阅读次数:
350
The determinant of a matrix 2?×?2 is defined as follows:
A matrix is called degenerate if its determinant is equal to zero.
The norm ||A|| of a matrix A is
defined as a maximum of absolute v...
分类:
其他好文 时间:
2015-06-07 13:52:04
阅读次数:
121
#include
#include
#include
#include
#include
#include
using namespace std;
bool fun(double l1,double r1,double l2,double r2){
return (l1 = l2) || (l2 >= l1 && l2 <= r1);
}
int main() {
doub...
分类:
其他好文 时间:
2015-06-07 09:31:20
阅读次数:
101
函数的概念与传统过程语言相同,定义格式略有不同def函数名(参数名1,参数名2):函数体deffunc(a,b):if(a>b)returnaelsereturnb注意的是,一般的,函数内定义的数据类型,作用于仅在函数内参数默认值:deffunc1(L1,L2=2):print(L1,L2)>>func1(4)4,2>>func1(4,5)4..
分类:
编程语言 时间:
2015-06-06 23:48:24
阅读次数:
140
实验步骤:1、首先配置各个路由器的IP地址,最好把IS-IS或者RIP协议也饿一起配置了,实在不行就再多分一个步骤。2、在R4上面做路由重分发。3、查看路由表是否齐全。4、打开VPCS配置IP地址,测试连通性。下面是详细配置过程:R1上面的IP地址和IS-IS协议配置,R1只是作为L1类型的..
分类:
其他好文 时间:
2015-06-05 22:59:03
阅读次数:
295
Given a singly linked list L: 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 ....
分类:
编程语言 时间:
2015-06-04 22:28:06
阅读次数:
151
Given a singly linked list L: 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 example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2015-06-04 09:49:54
阅读次数:
114
看似简单,轻易AD,但重点是和其他人写的代码进行比较从而学习C++:ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { ListNode* result; ListNode* cur; ListNode...
分类:
其他好文 时间:
2015-06-04 01:01:20
阅读次数:
123