2014-04-29
00:04题目:给定一个整数数组,找出所有加起来为指定和的数对。解法1:可以用哈希表保存数组元素,做到O(n)时间的算法。代码: 1 // 17.12
Given an array of integers and target value, find all pairs in ...
分类:
其他好文 时间:
2014-04-29 15:08:13
阅读次数:
469
1.下载angularjs进入其官网下载:https://angularjs.org/?,建议下载最新版的:https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.7/angular.js所有版本:https://code.angular...
分类:
Web程序 时间:
2014-04-29 14:36:28
阅读次数:
895
2014-04-29
03:05题目:给定一个词典,其中某些词可能能够通过词典里其他的词拼接而成。找出这样的组合词里最长的一个。解法:Leetcode上有Word
Break这道题,和这题基本思路一致。代码: 1 // 18.7 Given a list of words, find out the...
分类:
其他好文 时间:
2014-04-29 14:30:17
阅读次数:
493
2014-04-29
02:27题目:找出10亿个数中最小的100万个数,假设内存可以装得下。解法1:内存可以装得下?可以用快速选择算法得到无序的结果。时间复杂度总体是O(n)级别,但是常系数不小。代码:
1 // 18.6 Find the smallest one million number....
分类:
其他好文 时间:
2014-04-29 14:27:13
阅读次数:
665
如何在Ubuntu 14.04上安装steamos会话,以使用户的SteamOS
大图片模式直接从lightdm GTK迎宾开始进入。SteamOS是一个开源的基于Debian Wheezy分支的、为游戏的优化的操作系统。不像Debian
7,它使用的是xcompmgr图形合成器。SteamOS由维...
分类:
其他好文 时间:
2014-04-29 14:09:46
阅读次数:
573
最近给VPS重装了系统,因为服务商不提供DHCP,所以只好手动设置IP和DNS
Server。悲催的是系统重装的时候忘记了输入DNS
Server,最后导致进去系统后,各种域名无法解析。Linux中修改DNS有两种方式,临时修改和永久修改,下面分别介绍。1、临时修改网卡DNS地址sudo
vim /...
分类:
系统相关 时间:
2014-04-29 11:21:47
阅读次数:
597
题目: There are two sorted arrays A and B of size m
and n respectively. Find the median of the two sorted arrays. The overall run
time complexity should...
分类:
其他好文 时间:
2014-04-29 10:32:46
阅读次数:
359
List的几个方法List=>List.Find()List.FindAll()List.Contains()
List.ForEach()List.ConvertAll() 1. 先比较Find()跟FindAll()。 这个两个函数都是 遍历List的集合,只是
区别在于FindAll()返回的...
分类:
Web程序 时间:
2014-04-29 10:32:46
阅读次数:
443
add the following text to .vimrc or .gvimrc: if
has("cscope") set csprg=/usr/bin/cscope set csto=0 set cst set nocsverb " add
any database in cur...
分类:
其他好文 时间:
2014-04-29 10:27:46
阅读次数:
398
1.
下载最新版的nVidia驱动。http://www.nvidia.com/page/drivers.html2.编辑blacklist.conf。sudo
gedit /etc/modprobe.d/blacklist.conf添加以下部分并保存:blacklist vga16fbblackl...
分类:
其他好文 时间:
2014-04-29 10:15:46
阅读次数:
653