Problem Description:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Solution:1 Arrays.sort(A...
分类:
其他好文 时间:
2014-07-07 16:10:04
阅读次数:
174
Problem Description:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Solution: 1 public int singleNumber(int...
分类:
其他好文 时间:
2014-07-07 16:04:12
阅读次数:
178
Problem Description:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more diction...
分类:
其他好文 时间:
2014-07-07 16:02:11
阅读次数:
219
http://acm.hdu.edu.cn/showproblem.php?pid=1856真的无语了,一个并查集的水题,竟然做了两个多小时,我都怀疑我自己了,还有智商么?题意,找出最多认识人的集合我手残了N次 ,本题1000ms,数组10000000,所以要用哈希查找#include #inclu...
分类:
其他好文 时间:
2014-07-07 15:22:49
阅读次数:
185
《这是一篇童话》——刘丁宁
就像安徒生童话《野天鹅》里的小公主爱丽莎,为了十一个哥哥,可以不说一句话,甘之如饴地赤脚踏过荆棘,空手采摘荨麻,日夜不停地编织十一件大衣,宁愿被人当做巫师差点活活烧死……
也如冬小麦,秋种,越冬,春季返青,夏季收粮,等待属于自己的那个“one summer's day”那个夏天……
童话的意思,一是孩子说的话,不必放在心上;二是童话的意蕴:“过程也许会坎坷,但结局...
分类:
其他好文 时间:
2014-06-30 10:07:05
阅读次数:
141
今天加班试图push代码的时候,报出了如下错误:
出现这个错误之前,是在远程服务器上创建了一个tag v2.1.1,同时clone的服务器代码指定的分支也是branch v2.1.1,本地用git tag命令可以查看分支:
在本地删除多余的tag标签:
再次push, Everything thing is OK!...
分类:
其他好文 时间:
2014-06-30 09:40:27
阅读次数:
696
【题目】
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 segm...
分类:
其他好文 时间:
2014-06-30 09:02:26
阅读次数:
276
题目
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/...
分类:
其他好文 时间:
2014-06-29 23:16:19
阅读次数:
312
【题目】
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
【题意】
给定一个整数以外,其中除了一个整数只出现一次以外...
分类:
其他好文 时间:
2014-06-29 22:52:35
阅读次数:
246
Almost one year ago, I checked how different cache settings affected KVM storage subsystem performance. Results were very clear: to obtain good I/O sp...
分类:
系统相关 时间:
2014-06-29 19:47:59
阅读次数:
448