Like most moms today are trying to reduce the amount of sugar and processed foods your child is in contact with the challenge is to come up with gadge...
分类:
其他好文 时间:
2014-08-15 12:35:48
阅读次数:
253
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:
其他好文 时间:
2014-08-15 12:07:08
阅读次数:
145
题意 给两堆牌s1,s2交给你洗 每堆有c张 每次洗牌得到s12 其中s2的最下面一张在s12的最下面一张然后按顺序一张s1一张s2 洗好之后可以把s12下面的c张做s1 上面的c张做s2 求多少次洗牌之后可以得到输入给你的串s 不能得到输出-1
简单模拟 s1+s2!=s就一直洗牌 如果回到初始状态都没得到s就不会得到s了 得到s就可以输出洗牌次数了...
分类:
其他好文 时间:
2014-08-15 10:46:28
阅读次数:
353
操作系统:CentOS6.5,最小化安装装完系统之后开始装KVM虚拟机,当所有的环境安装完成时,网卡的配置文件也都完正无误的配置好了,重启网络的时候却出现报错:Bringupinterfaceeth0:Deviceeth0doesnotseemtobepresent,delayinginitialization。在网上搜了半天终于解决了:解..
分类:
系统相关 时间:
2014-08-15 02:55:08
阅读次数:
266
晕死的错误,改了半天也没想到是这样的原因,基础正要呀。。。先看一下警告信息:07-07 08:32:19.540: WARN/WindowManager(74): Failed looking up window07-07 08:32:19.540: WARN/WindowManager(74):j...
分类:
移动开发 时间:
2014-08-14 19:37:09
阅读次数:
859
You can set up your application to start Visual Studio when you launch the application from Windows. Visual Studio will load your application, ready f...
分类:
其他好文 时间:
2014-08-14 16:17:38
阅读次数:
227
写一个函数判断两个字符串是否是变位词。变位词(anagrams)指的是组成两个单词的字符相同,但位置不同的单词。比如说,
abbcd和abcdb就是一对变位词
这也是简单的题。 我们可以排序然后对比, 也可以直接统计字符出现的个数来判断。这里给出统计字符来判断的代码:
bool isAnagram1(const string& vLeft, const string& vRight)
{
...
分类:
其他好文 时间:
2014-08-14 03:50:27
阅读次数:
327
Rotate ImageYou are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?CC上的原题,...
分类:
其他好文 时间:
2014-08-14 03:45:17
阅读次数:
192
今天看到人家用css画了一个三角形,简简单单几行代码,惊讶css其实还有很多我们不知道的东西. 三角形其实还是可以用在很多地方的.其实就那么几行代码直接贴上: div.arrow-up?{
????width:?0;
????height:...
分类:
Web程序 时间:
2014-08-13 19:36:17
阅读次数:
277
先贴自己类比二维树状数组写的三维树状数组模板: 开始的时候循环体内j=y,k=z,没写,以为自己思路错了,,,hehe.....
更高维的树状数组以此类比
const int MAXN = 100+10;
int c[MAXN][MAXN][MAXN];int X,Y,Z;
int N;
inline int lowbit(int x){return x&(-x);}
void up...
分类:
其他好文 时间:
2014-08-13 19:00:37
阅读次数:
189