摘要: Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i... 阅读全文
posted @ 2015-08-04 22:36 ~每天进步一点点~ 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Trie树又被称为字典树、前缀树,是一种用于快速检索的多叉树。Tried树可以利用字符串的公共前缀来节省存储空间。但如果系统存在大量没有公共前缀的字符串,相应的Trie树将非常消耗内存。(下图为Wiki上的Trie树示意图, https://en.wikipedia.org/wiki/Trie)子节... 阅读全文
posted @ 2015-08-04 22:27 ~每天进步一点点~ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs... 阅读全文
posted @ 2015-08-04 21:54 ~每天进步一点点~ 阅读(123) 评论(0) 推荐(0) 编辑