描述:log(n)代码: 1 class Solution: 2 # @param x, an integer 3 # @return an integer 4 def getVal(self, begin, end, x): 5 if end == begi...
分类:
其他好文 时间:
2014-07-29 21:26:42
阅读次数:
263
描述:递归代码: 1 class Solution: 2 # @param num, a list of integers 3 # @return a tree node 4 def sortedArrayToBST(self, num): 5 if len(...
分类:
其他好文 时间:
2014-07-29 16:41:11
阅读次数:
210
redhat提供了一个redhat-upgrade-tool的升级工具;[1]配置软件源#vim/etc/yum.repos.d/upgrade.repo
[upgrade]
name=upgrade
baseurl=
enable=1
gpgcheck=0[2]安装软件工具yum-yinstallpreupgrade-assistant-contentsredhat-upgrade-toolpreupgrade-assistant[3]升级前检查潜在..
分类:
其他好文 时间:
2014-07-29 15:24:50
阅读次数:
278
我用vs2005较多,但网上找的代码经常是08 10 或者2012的,总结了以下技巧可以打开工程比较小巧的高版本代码。用记事本打开解决方案文件“解决方案名.sln”,然后修改最上面两行为如下代码:Microsoft Visual Studio Solution File, Format Versio...
分类:
其他好文 时间:
2014-07-29 11:51:26
阅读次数:
198
解法: 1 class Solution { 2 public: 3 int reverse(int x) { 4 int signal = (x>0)? 1:-1; /* signal记录正负号 */ 5 x=abs(x); 6 int ...
分类:
其他好文 时间:
2014-07-29 11:25:06
阅读次数:
197
这是一个循环操作,如果重数太多,只能递归搜索,不满足条件return 或者else,刚才出错了public class Solution { private String letters[] = {"","","abc", "def", "ghi", "jkl", "mno", "pqr...
分类:
其他好文 时间:
2014-07-29 11:08:26
阅读次数:
233
1 public class Solution { 2 public static int lengthOfLongestSubstring(String s) { 3 4 char[] arr = s.toCharArray(); 5 int pre = 0; 6 ...
使用pip升级时,虽然指定了版本,也使用了--upgrade参数,但pip就是不升级,Requested **, but installing version **,手动删了源文件也不行。后来发现一个细节就是pip安装的非常快,这速度像是没有请求网络,那就是本地有缓存了,进入/tmp目录,发现目录p...
分类:
其他好文 时间:
2014-07-29 10:32:06
阅读次数:
238
openNebula is the open-source industry standard for data center virtualization,offering a simple but feature-rich and flexible solution to build and m...
分类:
其他好文 时间:
2014-07-29 10:30:56
阅读次数:
286
Similar with "Longest Consecutive Sequence". Another usage to hashset.Take care of corner cases!class Solution {public: int firstMissingPositive(in...
分类:
其他好文 时间:
2014-07-28 15:16:43
阅读次数:
206