【102-Binary Tree Level Order Traversal(二叉树层序遍历)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level...
分类:
编程语言 时间:
2015-08-08 07:58:06
阅读次数:
259
function format(string) {var args = arguments;var pattern = new RegExp("%([1-" + arguments.length + "])", "g");return String(string).replace(pattern, ...
分类:
其他好文 时间:
2015-08-08 01:16:25
阅读次数:
122
字符ip向数值转换:1 create or replace function f_ip2number (v_ip in varchar2) return number is2 i number;3 begin4 i:=regexp_substr(v_ip,'(\d{1,3})',1,1)*167.....
分类:
数据库 时间:
2015-08-07 23:56:20
阅读次数:
405
------------------------------------------------------------------------------------之所以发现这个坑,源起项目中的支付宝页面跳转同步通知页return_url中的$verify_result始终返回false。$al...
分类:
Web程序 时间:
2015-08-07 23:49:08
阅读次数:
149
#include#include#includeusing namespace std;#define lson l,m,rt0) sum[rt]=1; else sum[rt]=-1; return ; } int m=(l+r)/2;...
分类:
其他好文 时间:
2015-08-07 23:40:59
阅读次数:
164
function add,x,y return, x+yendpro sum x=1 y=2 print,add(x,y)end 版权声明:本文博客原创文章,博客,未经同意,不得转载。
分类:
其他好文 时间:
2015-08-07 23:34:02
阅读次数:
100
题目Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string “23”...
分类:
其他好文 时间:
2015-08-07 22:23:27
阅读次数:
195
回顾:1.方法: 1)封装一段特定的逻辑功能 2)尽可能的独立,只干一件事 3)代码的重用、结构清晰、便于维护 4)可以被反复调用2.方法的定义: 修饰词 返回值类型 方法名(参数列表){ 方法体---算法 }3.return:无返回值方法中 ...
分类:
其他好文 时间:
2015-08-07 22:18:25
阅读次数:
261
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, given the following matr...
分类:
其他好文 时间:
2015-08-07 21:54:10
阅读次数:
116
/**
* 功能:实现整数的乘法、减法和除法运算。只允许使用加号。
*/
//减法
public static int minus(int a,int b){
return a+negate(b);
}
//取反
/**
* 思路:对正数k的取反,只需要将-1连续加k次;对负数k的取反,只需要将1连续加k次。
* @param a
* @return
*/...
分类:
其他好文 时间:
2015-08-07 20:15:16
阅读次数:
177