Given a binary tree, find all leaves and then remove those leaves. Then repeat the previous steps until the tree is empty. Example:Given binary tree 1 ...
分类:
其他好文 时间:
2016-07-21 00:21:36
阅读次数:
208
While Until For for numin 1...10 means "go up to but don't include 10." If we use two dots, this tells Ruby to include the highest number in the range ...
分类:
其他好文 时间:
2016-07-19 22:10:27
阅读次数:
180
Shell学习之路目录Shell学习之路【第一篇】:别名,管道,用户配置文件,变量,readShell学习之路【第二篇】:条件测试,运算符,选择结构,for循环结构Shell学习之路【第三篇】:While循环,C-for循环,Until循环,case分支结构,流程控制语句Shell学习之路【第四篇】:函数,数组,变量替..
分类:
系统相关 时间:
2016-07-19 13:58:51
阅读次数:
275
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:
其他好文 时间:
2016-07-14 15:03:35
阅读次数:
122
第一节:breank命令 4种循环 for、while、until、select,如果想要提早结束循环,可在循环中使用break命令。执行break时,会跳出一层的循环,如果想跳出多层循环,可在break命令之后加上层数n(n一定要大于或等于1)。 行5,如果i的值等于6,就跳出循环,即结束循环。 ...
分类:
系统相关 时间:
2016-07-14 13:11:21
阅读次数:
199
在Bash Shell中,流程控制命令有2大类:“条件”、“循环”。属于“条件”的有:if、case;属于“循环”的有:for、while、until;命令 select 既属于“条件”,也属于“循环”。不管是哪一种,均需进行条件测试,再根据测试结果,决定程序流程进行的方向。 以下逐一说明这些命令的 ...
分类:
系统相关 时间:
2016-07-14 13:10:52
阅读次数:
284
Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Example:Given bi ...
分类:
其他好文 时间:
2016-07-14 01:51:24
阅读次数:
129
一天一道LeetCode
本系列文章已全部上传至我的github,地址:ZeeCoder‘s Github
欢迎大家关注我的新浪微博,我的新浪微博
欢迎转载,转载请注明出处
(一)题目
Given a non-negative integer num, repeatedly add all its digits until the result has only one digi...
分类:
其他好文 时间:
2016-07-13 16:51:55
阅读次数:
138
php_sapi_name() 是用来检测PHP运行环境的函数。 该函数返回一个描述PHP与WEB服务器接口的小写字符串。 例如:aolserver, apache,apache2filter, apache2handler, caudium, cgi(until PHP 5.3),cgi-fcgi ...
Coins in a Line I There are n coins in a line. Two players take turns to take one or two coins from right side until there are no more coins left. The ...
分类:
其他好文 时间:
2016-07-10 06:26:55
阅读次数:
186