上一页 1 ··· 17 18 19 20 21
摘要: 最朴素的做法o(V*V/2+2E)~O(V^2)#include<iostream>using namespace std;#include<vector>#include<algorithm>#include<string>#include<string.h>const int MAX = 200 阅读全文
posted @ 2016-06-28 22:28 simple_wxl 阅读(204) 评论(0) 推荐(0) 编辑
摘要: KMP的子串长n,模式串长m,复杂度o(m+n),朴素做法的复杂度o((n-m+1)*m) 觉得大话数据结果上面这个讲得特别好 改进版本的KMP leetcode 28. Implement strStr() 28. Implement strStr() 阅读全文
posted @ 2016-06-28 21:18 simple_wxl 阅读(493) 评论(0) 推荐(0) 编辑
摘要: hive中的各种join操作 join是最简单的关联操作,两边关联只取交集。 outer join分为left outer join、right outer join和full outer join。 left outer join是以左表驱动,右表不存在的key均赋值为null; right ou 阅读全文
posted @ 2016-06-27 22:40 simple_wxl 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 1、引用和指针的区别 1)引用被创建的时候需要初始化,指针可以等到任何时候再初始化 2)引用不能指向NULL,指针可以指向NULL 3) 引用被初始化后,不能再绑定到其它对象,而指针初始化后,可以改变他指向的对象 对于第3条的理解: int m=90; int &n=m; int b=99; n=b 阅读全文
posted @ 2016-06-26 15:39 simple_wxl 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 前缀自增 UPInt & UPint::operator++() { *this+=1; return *this; } 后缀自增 const UPInt & UPint::operator++(int ) { UPint oldValue=*this; ++(*this); return oldV 阅读全文
posted @ 2016-06-12 15:39 simple_wxl 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 判别模型和生成模型 判别模型:求的是条件概率,如SVM,LR 生成模型: 比如要确定一只羊是山羊还是绵羊,利用生成模型,我们可以根据山羊的特征,首先学习出一个山羊模型;然后根据绵羊的特征学习出一个绵羊模型。然后从某一只羊中提取特征,放到山羊模型中看概率是多少,再放到绵羊模型中看概率是多少,哪个大就是 阅读全文
posted @ 2016-06-10 10:54 simple_wxl 阅读(128) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21