Maximum Gap: https://leetcode.com/problems/maximum-gap/
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Ret...
分类:
其他好文 时间:
2015-07-20 16:34:03
阅读次数:
158
声明:本文主要是基于网上的材料做了文字编辑,原创部分甚少。参考资料见最后。
隐马尔可夫模型(Hidden Markov Model,HMM),最大熵马尔可夫模型(Maximum Entropy Markov Model,MEMM)以及条件随机场(Conditional Random Field,CRF)是序列标注中最常用也是最基本的三个模型。HMM首先出现,MEMM其次,CRF最后。三个算法...
分类:
其他好文 时间:
2015-07-20 16:23:48
阅读次数:
250
Young theoretical computer scientist wyh2000 is teaching young pupils some basic concepts about strings.A subsequence of a stringsis a string that can...
分类:
其他好文 时间:
2015-07-20 15:52:23
阅读次数:
87
题意是说给出一个序列,现在要求出这个序列的一个最长子区间,要求子区间的最大值与最小值的差在[m, k]范围内,求区间长度做法是维护两个队列,一个维护到当前位置的最大值,一个维护最小值,然后计算当前节点i作为右端点的最常区间长度,那么扫描两个队列,维持单调性。然后比较两个队列头的差值,1.如果差值满足...
分类:
其他好文 时间:
2015-07-20 12:31:19
阅读次数:
134
Monotonic Queue is getting more popular, and finally LeetCode put it on.Typical Solution: element in array will be pushed\popped in\from a sorted data...
DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference betwee...
分类:
其他好文 时间:
2015-07-20 12:21:06
阅读次数:
82
1007. Maximum Subsequence Sum (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a sequence of K integers { N1, N2, ..., NK}. A conti...
分类:
其他好文 时间:
2015-07-20 09:12:29
阅读次数:
107
leetcode 239: Sliding Window Maximum
python c++ java...
题目Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window...
问题描述Given an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumb...