用两个队列实现,交叉使用,达到判断层的目的 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right...
分类:
其他好文 时间:
2014-09-06 23:47:44
阅读次数:
261
Unique Paths:
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is t...
分类:
其他好文 时间:
2014-09-06 22:37:14
阅读次数:
246
方法一:在Sql Server里控制:使用SQL中的函数Left 和Right ,Sql 语句:select left(你的字段名,你要显示的字数)from Table方法二:在ASP.NET页面中设计代码实现:数据直接绑定时控制120?DataBinder.eval_r(Container.Dat...
分类:
其他好文 时间:
2014-09-06 13:34:33
阅读次数:
163
<?php
//快速排序
function?quickSork($arr)
{
$count?=?count($arr);
if($count?<?1)
{
return?$arr;
}
$one?=?$arr[0];
$left_array?=?$right_array??=?array();
for($i?=?1;?$i?...
分类:
Web程序 时间:
2014-09-06 12:32:23
阅读次数:
172
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.N...
分类:
其他好文 时间:
2014-09-06 05:27:22
阅读次数:
223