// Fields 以连续的空白字符为分隔符,将 s 切分成多个子串,结果中不包含空白字符本身// 空白字符有:\t, \n, \v, \f, \r, ' ', U+0085 (NEL), U+00A0 (NBSP)// 如果 s 中只包含空白字符,则返回一个空列表func Fields(s str...
分类:
其他好文 时间:
2014-10-29 16:46:55
阅读次数:
129
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
public class Solution {
//模拟手算乘法
...
分类:
编程语言 时间:
2014-10-29 09:14:28
阅读次数:
168
package mainimport ( "io" "os" "strings" "fmt")type rot13Reader struct { r io.Reader}func (rot13 rot13Reader)Read(p []byte) (n int, err...
分类:
其他好文 时间:
2014-10-29 01:39:56
阅读次数:
231
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100". 1 public class Solution { 2 public String ...
分类:
其他好文 时间:
2014-10-29 00:11:02
阅读次数:
245
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".思路简单(同Add Two Numbers),可从代码得知,需要注意字符在字符串中的插入;co...
分类:
其他好文 时间:
2014-10-28 23:59:02
阅读次数:
343
传送门String painterTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionThere are two strings A and B with ...
分类:
其他好文 时间:
2014-10-28 21:16:36
阅读次数:
215
问题描述:
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
代码:
public class AddBinary { //java
public String addBinary(St...
分类:
其他好文 时间:
2014-10-28 20:06:26
阅读次数:
183
1,首先新建一个文件,选中ios模块下Rescource的Strings File 类型。eg:文件2,选中该文件,右边栏选该文件属性,选中Localizable模块,选中localiz,这时会弹出一个框,默认值为base,可以选为English 或者是 Chinese(Simplified)3,L...
分类:
移动开发 时间:
2014-10-28 19:48:46
阅读次数:
194
这种做法最普遍最简单:
1、新建一个android空项目;
2、在drawable目录下添加图标文件,如icon.png;在values目录下的strings.xml文件中增加名称,如websitename。
3、在配置文件AndroidManifest.xml中,增加链接的图标icon和名称websitename:
4、在MainActivity中编辑onCreate方法:
@Ove...
分类:
移动开发 时间:
2014-10-28 18:00:08
阅读次数:
257
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
实现二进制数相加,算法很简单就是两个String每位去相加,然后判断是否要进位。
一开始想到了一个不同的算法,即将两个String转为int型然后相加...
分类:
其他好文 时间:
2014-10-28 13:59:50
阅读次数:
237