一:环境准备: Windows、JDK1.8+、Maven、Git 二:RocketMQ准备: 1.http://rocketmq.apache.org/release_notes/release-notes-4.2.0/ 2.选择‘Binary’进行下载 下完完毕之后解压 三:配置 进行环境变量配 ...
求树的中序遍历,递归很简单,循环我用栈来实现,再用hashmap或者改变变量的值来记录一下。递归0ms,beats 100%,循环:改变值,1ms,beats 59.19%,用hashmap 2ms= = 只放循环的吧。 ...
分类:
其他好文 时间:
2018-12-14 00:51:53
阅读次数:
217
https://leetcode.com/problems/sum-of-left-leaves/ Find the sum of all left leaves in a given binary tree. Example: 代码: 刚打电话的时候发现我和 FH 都比夏天的时候胖了 脸都圆圆的 ...
分类:
其他好文 时间:
2018-12-13 20:20:41
阅读次数:
217
样例:root = [10,5,-3,3,2,null,11,3,-2,null,1], sum = 7,一开始以为10 5 -3也算一种情况,但实际上是不算的。 /** * Definition for a binary tree node. * public class TreeNode { *... ...
分类:
其他好文 时间:
2018-12-12 23:51:24
阅读次数:
193
实际上是找出某左右子树深度和最大的结点。不一定是根结点!!! ...
分类:
其他好文 时间:
2018-12-12 22:41:06
阅读次数:
303
A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents ...
分类:
编程语言 时间:
2018-12-12 19:02:37
阅读次数:
168
一,概述: auth 系统包括: 1)Users 2)Permissions: Binary (yes/no) flags designating whether a user may perform a certain task.(权限:二进制(是/否)标志,指示用户是否可以执行某个任务。) 3) ...
分类:
其他好文 时间:
2018-12-12 14:57:44
阅读次数:
154
Description 给你平面上 $n$ 个点 $(2 \leq n \leq 400)$,要求用这些点组成一个二叉树(每个节点的儿子节点不超过两个),定义每条边的权值为两个点之间的欧几里得距离。求一个权值和最小的二叉树,并输出这个权值。 其中,点 $i$ 可以成为点 $j$ 的的父亲的条件是:点 ...
分类:
其他好文 时间:
2018-12-12 00:13:04
阅读次数:
242
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Approach #1: C++. [recursive] Approach #2: Java. ...
分类:
其他好文 时间:
2018-12-12 00:08:53
阅读次数:
122
The Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaking, Leaves are Falling. Lovers Walk passing ...
分类:
编程语言 时间:
2018-12-11 01:34:27
阅读次数:
246