"结巴"中文分词的R语言版本,支持最大概率法(Maximum Probability),隐式马尔科夫模型(Hidden Markov Model),索引模型(QuerySegment),混合模型(MixSegment),共四种分词模式,同时有词性标注,关键词提...
分类:
编程语言 时间:
2014-12-22 11:24:00
阅读次数:
661
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-12-21 23:28:50
阅读次数:
224
class Solution {public: int maxProduct(int A[], int n) { if (A == NULL || n res) { res = tr; } if (tr ...
分类:
其他好文 时间:
2014-12-21 15:14:01
阅读次数:
128
class Solution {public: int maximumGap(vector &num) { int len = num.size(); int gap = 0; sort(num.begin(), num.end()); ...
分类:
其他好文 时间:
2014-12-21 12:38:51
阅读次数:
147
梅西刚梅开二度,我也记一题。在一个没排序的数组里,找出排序后的相邻数字的最大差值。要求用线性时间和空间。如果用nlgn的话,直接排序然后判断就可以了。so easyclass Solution {public: int maximumGap(vector &num) { if (...
分类:
其他好文 时间:
2014-12-21 01:50:48
阅读次数:
263
Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [...
分类:
其他好文 时间:
2014-12-20 20:51:21
阅读次数:
386
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Note:
You may ...
分类:
其他好文 时间:
2014-12-20 18:20:25
阅读次数:
128
打开已经做好的powerpivot文件之后,出现如下错误:
已超出每个用户的最大允许会话数
The maximum numberof allowed sessions for each user has exceeded
解决方法是,在管理中心,excel services应用程序中,全局配置,里面的会话管理中,将“每个用户的最大会话数”由25,改成250.
重新浏览后,页面正常。...
分类:
其他好文 时间:
2014-12-20 16:55:27
阅读次数:
192
题目
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
解答
求二叉树的最大深度。
递归:a.若二叉树为空,...
分类:
其他好文 时间:
2014-12-20 15:38:37
阅读次数:
173
class Solution {public: int maxPathSum(TreeNode *root) { if(root == NULL) return 0; int max_sum = INT_MIN; unordered_map node_...
分类:
其他好文 时间:
2014-12-19 21:53:01
阅读次数:
201