Add Binary Total Accepted: 46815 Total Submissions: 189215 My Submissions Given two binary strings, return their sum (also a binary string). For examp ...
分类:
其他好文 时间:
2017-04-11 13:28:39
阅读次数:
142
自定义函数以及函数调用 例子: 结果: 参数传递 可更改(mutable)与不可更改(immutable)对象 在 python 中,strings, tuples, 和 numbers 是不可更改的对象,而 list,dict 等则是可以修改的对象。 不可变类型:变量赋值 a=5 后再赋值 a=1 ...
分类:
编程语言 时间:
2017-04-10 13:31:32
阅读次数:
260
415. Add Strings Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 思路:由于一个字符与一个非负整数等价,所以直接对两 ...
分类:
其他好文 时间:
2017-04-09 22:09:26
阅读次数:
272
将数组元素反转有多种实现方式,这里介绍常见的三种. 直接数组元素对换 @Test public void testReverseSelf() throws Exception { System.out.println("use ReverseSelf"); String[] strings = { ...
分类:
编程语言 时间:
2017-04-09 10:34:47
阅读次数:
166
You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found ...
分类:
其他好文 时间:
2017-04-08 15:08:24
阅读次数:
204
strings--读出文件中的所有字符串 sed--文本编缉 awk--报表生成 awk [-F:] '[BEGIN{ commands }] [{ commands }] [END{ commands }]' filename -F指定分割符的标志,默认为空格(连续多个空格按一个算,tab等也算空 ...
分类:
系统相关 时间:
2017-04-08 11:07:29
阅读次数:
182
Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subs ...
分类:
其他好文 时间:
2017-04-08 00:25:01
阅读次数:
286
复杂的软件必须有清晰合理的架构,否则无法开发和维护。 MVC(Model-View-Controller)是最常见的软件架构之一,业界有着广泛应用。它本身很容易理解,但是要讲清楚,它与衍生的 MVP 和 MVVM 架构的区别就不容易了。 昨天晚上,我读了《Scaling Isomorphic Jav ...
分类:
Web程序 时间:
2017-04-07 21:39:38
阅读次数:
191
java中Boolean源码
//String转booleanpublicstaticBooleanvalueOf(Strings){returntoBoolean(s)?TRUE:FALSE;
}
privatestaticbooleantoBoolean(Stringname){return((name!=null)&&name.equalsIgnoreCase("true"));
}
//boolean转String
publicstaticS..
分类:
编程语言 时间:
2017-04-06 17:20:51
阅读次数:
134
Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi ...
分类:
其他好文 时间:
2017-04-05 01:25:52
阅读次数:
144