这道题因为不仔细的缘故两次过,与Maximum Depth of Binary
Tree问题类似,区别在于这个问题中,如果一个节点左子树为空、右子树有值,则该节点的深度应取决于右子树,而不能直接取min{左,右} 1 /** 2 *
Definition for binary tree 3 * .....
分类:
其他好文 时间:
2014-05-10 01:40:13
阅读次数:
293
1 /** 2 * Definition for binary tree 3 * public
class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 *
TreeNo...
分类:
其他好文 时间:
2014-05-09 12:16:45
阅读次数:
232
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-09 12:00:21
阅读次数:
309
介绍:AIDL 即 Android Interface Definition
Language使用:1.新建.aidl文件1 //AIDL 文件所在的包2 package com.houny.demo_aidl.aidl;3 4
//接口名必须和AIDL文件名一致5 interface ISay{6...
分类:
移动开发 时间:
2014-05-08 21:32:42
阅读次数:
511
/*
* Determine if a process group is "orphaned", according to the POSIX
* definition in 2.2.2.52. Orphaned process groups are not to be affected
* by terminal-generated stop signals. Newly orp...
分类:
其他好文 时间:
2014-05-07 16:23:22
阅读次数:
383
Check nagios配置文件报错如下:[nagios@2 etc]$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Nagios Core 4.0.6Copyright (c) 2009-present Nagios Core Development Team and Community Contributor...
分类:
移动开发 时间:
2014-05-07 15:47:14
阅读次数:
449
import org.junit.Test;
public class Multiple {
public void printMultiple99() {
int i = 1;
for (; i < 10; i++)
for (int j = 1; j <= i; j++)
System.out.print(j + "*" + i + "=" + i * j + " ...
分类:
其他好文 时间:
2014-05-07 06:46:25
阅读次数:
359
There are a lot of controversy about the definition of probability, so we just start with the uncontroversial parts. In general we can say that the probability is a value between 0 and 1 that
is int...
分类:
其他好文 时间:
2014-05-07 03:12:35
阅读次数:
224
(defun buffer-exists (bufname)
(not (eq nil (get-buffer bufname))))
(defun make-shell (name)
"Create a shell buffer named NAME."
(interactive "sName: ")
(if (buffer-exists "*eshell*")...
分类:
其他好文 时间:
2014-05-06 19:40:04
阅读次数:
262
reference
from:http://www.cs.bgu.ac.il/~spl051/Personal_material/Practical_sessions/Ps_12/ps12.htmlJava
server class with multiple client connections:...
分类:
其他好文 时间:
2014-05-04 10:15:23
阅读次数:
355