这两道题用递归的解法都很简单,只是稍有不同。下面是AC代码: 1 /** 2 * Given a
binary tree, find its minimum depth. 3 * the minimum depth is the number of
nodes along th...
分类:
其他好文 时间:
2014-05-10 08:47:32
阅读次数:
271
写了一个基于System.IO.Path类型方法的扩展类型,用于快速对文件系统路径进行操作。如下图:其中有许多方法就是直接调用Path类型的静态方法。比如AppendPath方法内部会直接调用Path.Combine。这些方法就不需要再介绍了。下面看一些许多说明的方法:ToDirectory方法会把...
分类:
其他好文 时间:
2014-05-10 02:09:47
阅读次数:
276
这道题因为不仔细的缘故两次过,与Maximum Depth of Binary
Tree问题类似,区别在于这个问题中,如果一个节点左子树为空、右子树有值,则该节点的深度应取决于右子树,而不能直接取min{左,右} 1 /** 2 *
Definition for binary tree 3 * .....
分类:
其他好文 时间:
2014-05-10 01:40:13
阅读次数:
293
1,安装arm-linux-gcc安装方法,将安装包解压到/opt下,然后vim
/.bashrc修改一行:export PATH =
$PATH:/opt/FriendlyARM/tooschain/4.5.1/bin,后面是安装的路径,重新登录系统,注销即可,然后arm-linux-+Tab键就...
分类:
系统相关 时间:
2014-05-10 01:33:20
阅读次数:
512
先百度搜索"jdk下载" 安装完成之后,到系统环境变量设置(电脑右键,属性,高级系统设置)
然后点击下面path系统变量,把C:\Program Files
(x86)\Java\jdk1.6.0_05\bin;(bin的路劲复制到path最前面粘贴,别忘了加分号) 接着到...
分类:
编程语言 时间:
2014-05-10 01:15:13
阅读次数:
330
path环境变量配置的目的classpath环境变量配置的mudjava的jre提供了哪些支持1: path环境变量是为了执行java.exe
和javac.exe命令的时候,可以找到这两个文件。java一般主要用的就是这两个执行文件。之前path环境变量配置的值就是jdk安装的路径。2:
cl.....
分类:
移动开发 时间:
2014-05-10 01:09:57
阅读次数:
346
Given two wordsword1andword2, find the minimum
number of steps required to convertword1toword2. (each operation is counted as 1
step.)You have the fol...
分类:
其他好文 时间:
2014-05-10 01:09:28
阅读次数:
325
Given two words word1 and word2, find the
minimum number of steps required to convert word1 to word2. (each operation is
counted as 1 step.)You have t...
分类:
其他好文 时间:
2014-05-09 19:09:35
阅读次数:
318
错误信息:HTTP Status 404 - There is no Action mapped
for namespace [/] and action name [updateUser!getUserByName] associated with
context path [/123shop].
分类:
其他好文 时间:
2014-05-09 18:04:52
阅读次数:
281
ASP.NET连接LDAP数据库的有关信息一、封装在DAL层中的获取用户信息的函数//////按照用户Id查找用户信息/////////publicDirectoryEntry
GetUser(string username){string path = System.Configuration.....
分类:
Web程序 时间:
2014-05-09 16:53:59
阅读次数:
418