摘要: 只能咬咬牙,往前冲了。 阅读全文
posted @ 2014-02-09 14:43 来自海边的一片云 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 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 from C unlimited number of times.Note:All numbers (including target) will be positive integers.Elements in a combination (a1, a 阅读全文
posted @ 2014-02-08 09:20 来自海边的一片云 阅读(501) 评论(0) 推荐(0) 编辑
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4],]这类组合问题的思路常见的一个办法就是递归。如果show(在结果里面show)那么该怎么处理,如果not show (不出现在结果里面)该怎么处理。void C(vector array, int start, int k, v... 阅读全文
posted @ 2014-02-08 07:18 来自海边的一片云 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, given s = "leetcode", dict = ["leet", "code"].Return true because "leetcode" can be segmented as " 阅读全文
posted @ 2014-02-07 13:36 来自海边的一片云 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.set(key, value)- Set or insert the value if the key is not 阅读全文
posted @ 2014-02-06 15:41 来自海边的一片云 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 由于最近稍微轻松了一点,不需要一天当成48小时用,可以写写博客了。另外利用这段时间补充一些知识,make a deep dive. :D 阅读全文
posted @ 2009-12-24 15:53 来自海边的一片云 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 简述一下SQL injection 阅读全文
posted @ 2007-08-02 01:23 来自海边的一片云 阅读(317) 评论(0) 推荐(0) 编辑
摘要: FUZZ testing 阅读全文
posted @ 2007-07-12 02:28 来自海边的一片云 阅读(476) 评论(0) 推荐(0) 编辑
摘要: XML库的解析效率主要包括解析、存储、导出、遍历、修改、XPath定位 等等。 XML的访问模型主要有三种,DOM, SAX,PULL。 DOM即Document Object Model,是最常用的XML解析库。DOM 适用的范围是频繁的不定向随机性访问,以及进行 xslt 之类的转换。 例如如果你需要用xpath 查询或者你要遍历, DOM.还是不错的 只读不只读基本上对规模/性能没什么太大影响. BTW XSLT的功能还是相当强大的。 如果格式基本上固定的单向读取,即不用遍历, 或者一次性遍历, SAX 就是了. 如果格式比较灵活且对效率要求高 pull 模型适用, XmlLite是基于 pull 模型的。在第四期的MSDN magazine上有关于XML lite的讨论。 因为 sax 是由 reader 将所有内容推给你,pull 则是在需要的时候将信息从 reader 拉回来,如果一个节点忽略不处理时,sax 引擎后台还是解析pull 则只需要做最简单的 tag 匹配就可跳过 阅读全文
posted @ 2007-04-27 00:14 来自海边的一片云 阅读(832) 评论(0) 推荐(0) 编辑
摘要: 哈哈。 阅读全文
posted @ 2007-04-12 00:03 来自海边的一片云 阅读(111) 评论(0) 推荐(0) 编辑