import java.util.ArrayList; import java.util.List; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; /** * Created by itworker3... ...
分类:
其他好文 时间:
2017-05-10 12:52:09
阅读次数:
191
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 b ...
分类:
其他好文 时间:
2017-05-10 12:51:37
阅读次数:
136
题目: 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 ...
分类:
其他好文 时间:
2017-05-10 11:36:11
阅读次数:
171
Given a binary tree, return the values of its boundary in anti-clockwise direction starting from root. Boundary includes left boundary, leaves, and ri ...
分类:
其他好文 时间:
2017-05-10 01:04:46
阅读次数:
165
题目: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). Example Given binary tree {3 ...
分类:
其他好文 时间:
2017-05-09 23:14:37
阅读次数:
188
题目: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. Example Given the below binary tree: 1 / \ 2 3 ...
分类:
其他好文 时间:
2017-05-09 21:39:12
阅读次数:
121
http://www.lintcode.com/zh-cn/problem/binary-tree-maximum-path-sum/# 注意点: root == null ,return Integer.MIN_VALUE 就说明为了一定排除这个结点,将这个结点值设为最小值,也说明路径中是至少包含 ...
分类:
其他好文 时间:
2017-05-09 12:34:22
阅读次数:
199
MyBatis 通过包含的jdbcType类型 BIT FLOAT CHAR TIMESTAMP OTHER UNDEFINEDTINYINT REAL VARCHAR BINARY BLOB NVARCHARSMALLINT DOUBLE LONGVARCHAR VARBINARY CLOB NC ...
分类:
数据库 时间:
2017-05-09 11:35:08
阅读次数:
276
原题 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 o ...
分类:
其他好文 时间:
2017-05-09 11:24:05
阅读次数:
162
前言 使用递归(Recursion)建立二叉树(Binary Tree)的非顺序存储结构(即二叉链表),可以简化算法编写的复杂程度,但是递归效率低,而且容易导致堆栈溢出,因而很有必要使用非递归算法。 引入 无论是单链表还是二叉树,创建时要解决问题就是关系的建立,即单链表中前驱节点与当前节点的关系和二 ...
分类:
其他好文 时间:
2017-05-09 01:00:59
阅读次数:
372