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
今天要用yum安装软件,于是yum install ***,但是报错,错误如下:There was a problem importing one of the Python modules required to run yum. The error leading to this problem...
分类:
其他好文 时间:
2014-07-07 14:55:42
阅读次数:
350
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2014-07-03 11:53:07
阅读次数:
182
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [?2,1,?3,4,?1,2,1...
分类:
其他好文 时间:
2014-07-01 00:23:01
阅读次数:
248
今天加班试图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