要求:求二叉树的深度(二叉树的深度为最远叶子节点到根节点的距离,即根节点到最远叶子节点的距离)Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest ...
分类:
其他好文 时间:
2014-11-27 17:55:50
阅读次数:
145
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.Th...
分类:
其他好文 时间:
2014-11-27 16:30:19
阅读次数:
226
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2014-11-27 16:14:23
阅读次数:
184
实验环境:CentOSrelease6.6(Final)一台IP地址:172.16.249.230Htop是一款运行于Linux系统监控与进程管理软件,用于取代Unix下传统的top。与top只提供最消耗资源的进程列表不同,htop提供所有进程的列表,并且使用彩色标识出处理器、swap和内存状态。用户一般可以在top无法提供..
分类:
系统相关 时间:
2014-11-27 10:54:41
阅读次数:
330
问题描述:
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Recursive solution...
分类:
其他好文 时间:
2014-11-26 22:39:25
阅读次数:
227
BandwidthGiven a graph (V,E) where V is a set of nodes and E is a set of arcs in VxV, and anorderingon the elements in V, then thebandwidthof a nodevi...
分类:
其他好文 时间:
2014-11-26 20:54:01
阅读次数:
111
Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the or...
分类:
其他好文 时间:
2014-11-26 20:34:57
阅读次数:
238
htop是一款运行于Linux下交互式系统监控与进程管理软件,可以取代Linux/Unix下传统的top命令,htop用C语言编写,采用了ncurses库,因此使用有此功能需要安装ncurses。与top相比有什么优点:1.htop提供所有进程列表,并以不同颜色标识出CPU、swap和内存等状态2.更优雅的显示界面..
分类:
系统相关 时间:
2014-11-26 19:13:53
阅读次数:
330
原题地址:https://oj.leetcode.com/problems/partition-list/题目内容:Given a linked list and a valuex, partition it such that all nodes less thanxcome before nod...
分类:
其他好文 时间:
2014-11-26 18:47:01
阅读次数:
196
DivisionWrite a program that finds and displays all pairs of 5-digit numbers that between them use the digits0through9once each, such that the first n...
分类:
其他好文 时间:
2014-11-26 14:08:05
阅读次数:
157