1.记忆基础推理法(Memory-Based Reasoning;MBR)
记忆基础推理法最主要的概念是用已知的案例(case)来预测未来案例的一些属性(attribute),通常找寻最相似的案例来做比较。
记忆基础推理法中有两个主要的要素,分别为距离函数(distance function)与结合函数(combination function)。距离函数的用意在找出最相似的案例;结合...
分类:
其他好文 时间:
2014-09-25 20:37:17
阅读次数:
299
string-combination-permutation
分类:
其他好文 时间:
2014-09-23 00:20:13
阅读次数:
259
引用剑指offer 1 //组合,从字符串str中取m个字符的所有组合,结果保存在vector中 2 void combination(char* str,int m,vector& result){ 3 //有两个停止条件:m==0或者*str=='\0' 4 //先判断m 5 ...
分类:
其他好文 时间:
2014-09-20 15:16:27
阅读次数:
203
这两道题的基本思路和combination那一题是一致的,也是分治的方法。其中combination Sum复杂一点,因为每个数可能用多次。仔细分析下,本质上也是一样的。原来是每个数仅两种可能。现在每个数有k +1中可能,k = target / i。所以就是把简单的if else 分支变成for循...
分类:
其他好文 时间:
2014-09-11 22:15:22
阅读次数:
188
Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thes...
分类:
其他好文 时间:
2014-09-09 10:54:08
阅读次数:
190
由于需要就地保存清零信息,所以把信息保存在第一行和第一列 1 class Solution { 2 public: 3 void setZeroes(vector > &matrix) { 4 const int ROW = matrix.size(); 5 ...
分类:
其他好文 时间:
2014-09-06 23:46:04
阅读次数:
261
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:
其他好文 时间:
2014-09-05 17:35:41
阅读次数:
227
一开始的思路是:中序遍历+判断遍历后的数组,时间空间都不是最优果然超时了 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * ...
分类:
其他好文 时间:
2014-09-04 23:35:50
阅读次数:
393
Combination Sum
Given a set of candidate numbers (C) and a target number (T),
find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen fro...
分类:
其他好文 时间:
2014-09-02 17:48:05
阅读次数:
244
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:
其他好文 时间:
2014-09-02 00:07:23
阅读次数:
258