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 comple ...
分类:
其他好文 时间:
2016-10-29 14:43:18
阅读次数:
196
在利用张乐博士的最大熵模型工具包(Maximum Entropy Modeling Toolkit for Python and C++)和条件随机场的经典工具包CRF++(CRF++: Yet Another CRF toolkit)进行分词的时候,发现工具包不能正常安装,从报出的错误推测是gcc ...
分类:
其他好文 时间:
2016-10-29 07:39:07
阅读次数:
179
最长公共子串与最长公共子序列是有区别的。区别在于最长公共子串要求字符是连续的。 例如:str1: abcd str2: abec那么最长公共子序列是:abc,长度为3最长公共子串是:ab,长度为2 1. 最长公共子序列 Largest common subsequence 最长公共子序列:用f[i] ...
分类:
其他好文 时间:
2016-10-26 19:10:43
阅读次数:
172
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 l ...
分类:
编程语言 时间:
2016-10-26 13:07:52
阅读次数:
156
DEFAULT_INITIAL_CAPACITY = 16 Node数组的默认长度 MAXIMUM_CAPACITY = 1073741824 Node数组的最大长度 DEFAULT_LOAD_FACTOR = 0.75F 负载因子,调控控件与冲突率的因数 TREEIFY_THRESHOLD = 8 ...
分类:
其他好文 时间:
2016-10-25 16:49:58
阅读次数:
219
<!doctype html> <html> <head> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"> <meta charset ...
分类:
其他好文 时间:
2016-10-25 07:47:53
阅读次数:
228
We have a lot of ways to solve the maximum subsequence sum problem, but different ways take different time. 1、Brute-force algorithm 2、a little imporve ...
分类:
其他好文 时间:
2016-10-24 23:15:06
阅读次数:
295
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo ...
分类:
其他好文 时间:
2016-10-24 21:03:27
阅读次数:
208
<!DOCTYPE><html><head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1. ...
分类:
微信 时间:
2016-10-24 20:17:43
阅读次数:
347