题目:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.代码:/** * De...
分类:
其他好文 时间:
2015-05-16 13:12:01
阅读次数:
116
地址:https://oj.leetcode.com/problems/maximal-rectangle/Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones...
分类:
其他好文 时间:
2015-05-16 11:54:21
阅读次数:
176
题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.代码:/** * Def...
分类:
其他好文 时间:
2015-05-16 11:53:57
阅读次数:
141
首先声明:我们要构建的是扩展或者模块名为hello_module.该模块提供一个方法:hello_word.一、PHP环境的搭建1)一般使用源码包编译安装,而不是binary包安装。因为使用PHP的二进制分发包安装有些冒险,这些版本倾向于忽略./configure的两个重要选项,它们在开发过程中很便...
分类:
Web程序 时间:
2015-05-16 00:03:15
阅读次数:
283
序列化: 对象-->流-->保存到文件一个类要想被序列化,必须加 [Serializable]标识为可序列化 二进制序列化器: 命名空间: using System.Runtime.Serialization.Formatters.Binary; 类: BinaryFormatter------.....
分类:
其他好文 时间:
2015-05-15 19:39:09
阅读次数:
113
题目:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution s...
分类:
其他好文 时间:
2015-05-15 13:21:07
阅读次数:
113
题目:Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattene...
分类:
其他好文 时间:
2015-05-15 10:23:04
阅读次数:
119
题目:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / ...
分类:
其他好文 时间:
2015-05-15 10:22:50
阅读次数:
125
题目描述:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
即给定一个升序排列的数组,现在将它转换成一个平衡二叉树。
解题思路;
数组排好序,相当于我们最后y...
分类:
其他好文 时间:
2015-05-15 09:12:18
阅读次数:
113
描述:
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
思路:
将字符串从后向前进行相加,最后有进位的话再创造新的位数,最后将字符串反转,输出即可。...
分类:
其他好文 时间:
2015-05-15 09:06:04
阅读次数:
99