class Solution { public int sumNumbers(TreeNode root) { return sumNumber("", root); } private int sumNumber(String str, TreeNode node){ if(node==null)... ...
分类:
其他好文 时间:
2017-10-04 12:32:17
阅读次数:
121
设计模式(十二)——组合模式一、组合模式简介1、组合模式简介组合模式将对象组合成树形结构以表示“部分-整体”的层次结构,使得用户对单个对象和组合对象的使用具有一致性。组合模式为解决组件之间的递归组合提供了解决的办法,主要分为两个派生类:A、Leaf是叶子结点,是不..
分类:
其他好文 时间:
2017-10-03 15:26:52
阅读次数:
198
Given a binary tree, generate all root to leaf paths of a binary tree. Example: Example Tree The output for the above example is [[1, 2, 4], [1, 2, 5] ...
分类:
其他好文 时间:
2017-10-03 00:52:30
阅读次数:
187
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: //如果有子节点,字符串随着递归一直累加,直到没 ...
分类:
其他好文 时间:
2017-09-28 14:45:14
阅读次数:
161
红黑树的性质: (1) Every node is either red or black. (2) The root is black. (3) Every leaf (NULL) is black. (4) If a node is red, then both its children are ...
分类:
其他好文 时间:
2017-09-18 13:20:20
阅读次数:
138
题目描述 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 s ...
分类:
其他好文 时间:
2017-09-11 22:50:58
阅读次数:
169
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up ...
分类:
其他好文 时间:
2017-09-07 11:59:59
阅读次数:
150
转自:https://toutiao.io/posts/0l7l7n/preview Leaf 游戏服务器框架简介 Leaf 是一个由 Go 语言(golang)编写的开发效率和执行效率并重的开源游戏服务器框架。Leaf 适用于各类游戏服务器的开发,包括 H5(HTML5)游戏服务器。 Leaf 的 ...
分类:
编程语言 时间:
2017-08-31 13:00:54
阅读次数:
1199
Leaf 是一个使用 Go 语言开发的开源游戏服务器框架,注重运行效率并追求极致的开发效率。Leaf 适用于几乎所有的游戏类型。其主要的特性: 良好的使用体验。Leaf 总是尽可能的提供简洁和易用的接口,尽可能的提升开发的效率 稳定性。Leaf 总是尽可能的恢复运行过程中的错误,避免崩溃 多核支持。 ...
分类:
其他好文 时间:
2017-08-31 12:31:28
阅读次数:
150
0.前言本文旨在使用一个全新安装好的Linux系统从0开始进行Hadoop伪分布式环境的搭建,以达到快速搭建的目的,从而体验Hadoop的魅力所在,为后面的继续学习提供基础环境。对使用的系统环境作如下说明:操作系统:CentOS6.564位主机IP地址:10.0.0.131/24主机名:leaf用户名:roo..
分类:
其他好文 时间:
2017-08-30 10:02:34
阅读次数:
207