Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-09-09 15:11:38
阅读次数:
140
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:
其他好文 时间:
2014-09-09 15:09:08
阅读次数:
256
chr()、unichr()和ord()chr()函数用一个范围在range(256)内的(就是0~255)整数作参数,返回一个对应的字符。unichr()跟它一样,只不过返回的是Unicode字符,这个从Python 2.0才加入的unichr()的参数范围依赖于你的Python是如何被编译的。如...
分类:
编程语言 时间:
2014-09-09 15:08:28
阅读次数:
247
安装步骤:Gevent依赖libevent和greenlet,需要分别安装。1,安装 macport (如已安装,可以跳过)2,通过终端 键入:sudo port install libevent3,安装 pip : sudo easy_install pip4,安装 greenlet :sudo ...
分类:
其他好文 时间:
2014-09-09 15:06:38
阅读次数:
227
一.JSP隐含对象初见;
(1)面试的时候总会有9大隐含对象,下边就详细介绍一下;
(2)在JSP页面中,经常要处理request请求、response响应等信息,为了简化程序设计,JSP规范定义了常用的9个隐含对象(implicit objects),
这些隐含对象不需要在JSP页面中用new关键字来创建,而是由Servlet容器来创建与管理,并传递给JSP页面的Servlet实现类使用。...
分类:
Web程序 时间:
2014-09-09 13:19:38
阅读次数:
238
Letter Combinations of a Phone Number
Total Accepted: 15964 Total
Submissions: 60700My Submissions
Given a digit string, return all possible letter combinations that the number could repr...
分类:
其他好文 时间:
2014-09-09 13:13:39
阅读次数:
191
二叉树的遍历:
前序遍历:根节点->左子树->右子树
中序遍历:左子树->根节点->右子树
后序遍历:左子树->右子树->根节点
求下面树的三种遍历:
前序遍历:abdefgc
中序遍历:debgfac
后序遍历:edgfbca
详细的二叉树的操作可以看一下我之前写的文章
二叉树java
已知前序、中序遍历,求后...
分类:
其他好文 时间:
2014-09-09 12:56:38
阅读次数:
489
subprocess--子进程管理器?
一、subprocess 模块简介
subprocess最早是在2.4版本中引入的。
subprocess模块用来生成子进程,并可以通过管道连接它们的输入/输出/错误,以及获得它们的返回值。
它用来代替多个旧模块和函数:
os.system
os.spawn*
os.popen*
popen2.*
commands.*
关于这个模...
分类:
编程语言 时间:
2014-09-09 12:37:38
阅读次数:
284