For a given sorted array (ascending order) and a target number,
find the first index of this number in O(log n) time
complexity.
If the target number does not exist in the array, return -1.
...
分类:
其他好文 时间:
2015-08-03 19:08:48
阅读次数:
151
Add Binary
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
两字符串表示的2进制数。求它们的和。
直接模拟,从最后一位开始每一位都相加,结果保存在栈中。
class Solut...
分类:
其他好文 时间:
2015-08-03 19:07:54
阅读次数:
115
/** 智能机浏览器版本信息:**/ var browser={ versions:function(){ var u = navigator.userAgent, app = navigator.appVersion; return {//移动终端...
分类:
移动开发 时间:
2015-08-03 18:59:29
阅读次数:
231
1.尝试在方法中编写一个匿名内部类。package com.lzw;public class AnonymityInnerClass {}class OuterClass4{ public OutInterface doit(final String s){ return new OutInter....
分类:
编程语言 时间:
2015-08-03 18:58:16
阅读次数:
466
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:
编程语言 时间:
2015-08-03 18:48:01
阅读次数:
105
1、日期字符戳转时间 renderer : function(value, arg2) { if (value != null && value != '') { var date = new Date(); date.setTime(value); return ''...
分类:
Web程序 时间:
2015-08-03 18:35:19
阅读次数:
128
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th...
分类:
其他好文 时间:
2015-08-03 18:29:53
阅读次数:
163
写完类或函数(注意必须写完,不然出现的信息会不完整)后,在其上方空行输入/**,然后回车/** * * @param string $a * @param string $b * @param string $c * @return boolean */ ...
分类:
其他好文 时间:
2015-08-03 18:29:36
阅读次数:
98
Maximal Square
Total Accepted: 8699
Total Submissions: 44034
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.
For example,...
分类:
其他好文 时间:
2015-08-03 17:00:01
阅读次数:
115
输入n(using namespace std;typedef long long LL;LL a[15];LL gcd(LL a,LL b) //求a和b的最大公约数{ if(b) return gcd(b,a%b); return a;}LL lcm(LL a,LL b) //求a和b的最小公倍...
分类:
其他好文 时间:
2015-08-03 16:45:43
阅读次数:
155