LeetCode_Construct Binary Tree from Inorder and Postorder Traversal 解题思路...
分类:
其他好文 时间:
2015-06-29 20:26:47
阅读次数:
82
问题描述:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:
其他好文 时间:
2015-06-29 20:19:54
阅读次数:
104
问题描述:Given two binary strings, return their sum (also a binary string).For example,
a = “11”
b = “1”
Return “100”.
解决方案:class Solution {
public:
string addBinary(string a, string b) {
i...
分类:
其他好文 时间:
2015-06-29 17:06:23
阅读次数:
101
在分布式系统开发中,基于gradle的项目,要共享jar一般是借助maven私服。那么gradle的maven插件如何做到上传binary jar,source jar, javadoc jar到私服呢?选择http方式发布jar,则配置如下:allprojects{ applyplugin:'j....
分类:
其他好文 时间:
2015-06-29 16:39:10
阅读次数:
1409
题意:根据这种进制的算法,例如,给你一个左式,要求推出右式。(其实右式就是一个十进制数,根据这种进位的方法来转成特殊进制的数。)思路:观察转换特点,有点类似于二进制,但是其在后面还减一了。比如25-1、24-1 ...21-1。如果我们不减1会怎样?如上式,从左边看起,就会多加了(25-1)*1+1...
分类:
其他好文 时间:
2015-06-29 16:26:53
阅读次数:
82
原题如下:
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).我的算法:
1. 首先获得树的高度
2. 层序递归遍历二叉树实现如下:package leet...
分类:
其他好文 时间:
2015-06-29 15:02:29
阅读次数:
130
很经典的树形DP(如果不会树形DP建议先看以下..我就是先看了别的题,,握手的什么的)
给一棵树,留下N条边(它若留下边父亲的边比留下),,问最后苹果最多多少个.......
建树我觉得很费劲,,,毕竟不太会........DP比较好理解吧,,,,,,,就是多想一想把,,,,,当作模板题记录下来~~~~
#include
#include
#include
using...
分类:
移动开发 时间:
2015-06-29 15:00:39
阅读次数:
139
LeetCode_Validate Binary Search Tree 解题思路...
分类:
其他好文 时间:
2015-06-29 14:57:35
阅读次数:
118
使用Android Studio编译项目时总提示:JAVA (TM) Platform SE binary stop working,导致编译出错。
如题遇到该问题,费劲脑汁,百思不得其解。百般尝试后找到办法:
原问题地址:http://blog.csdn.net/serapme/article/details/46647449问题原因:
项目中文件地址路径过长,超过255bytes.解决办法:...
分类:
移动开发 时间:
2015-06-29 13:23:13
阅读次数:
148
228Summary Ranges21.10%Easy227Basic Calculator II18.00%Medium226Invert Binary Tree35.40%Easy225Implement Stack using Queues29.60%Medium224Basic Calcul...
分类:
其他好文 时间:
2015-06-29 00:25:36
阅读次数:
863