Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustrate the problem.BinaryTreeInpu...
分类:
其他好文 时间:
2014-11-09 20:41:07
阅读次数:
196
给一个二叉树,判断这个树是不是镜像的(对称的)。...
分类:
其他好文 时间:
2014-11-09 19:35:05
阅读次数:
193
题目地址:POJ 2420
今天在比赛遇到了这题。。于是现场学了一下模拟退火。。。。
这题是先初始化为一个点,然后不断趋近距离和最短的点。还是挺简单的。。
代码如下:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
u...
分类:
其他好文 时间:
2014-11-09 19:33:18
阅读次数:
184
$(document).ready(function(){ var Index = { init:function(){ var setting = { treeId:'tree' }; ...
分类:
其他好文 时间:
2014-11-09 17:47:05
阅读次数:
161
MySQL Binary Log也就是常说的bin-log, ,是mysql执行改动产生的二进制日志文件,其主要作用有两个: * 数据回复 * 主从数据库。用于slave端执行增删改,保持与master同步。 1.开启binary log功能 ???? 需要修改...
分类:
数据库 时间:
2014-11-09 16:44:59
阅读次数:
312
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 only n...
分类:
其他好文 时间:
2014-11-09 16:41:17
阅读次数:
122
Binary Tree Level Order TraversalGiven a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).Fo...
分类:
其他好文 时间:
2014-11-09 16:26:48
阅读次数:
127
这道题A的略烦Binary Tree Level Order Traversal IIGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right...
分类:
其他好文 时间:
2014-11-09 15:09:19
阅读次数:
238
Given a BST, transform it into greater sum tree where each node contains sum of all nodes greater than that node.自己想的复杂了,其实就是一个反向的inorder。新的值就是前面所有元素的...
分类:
其他好文 时间:
2014-11-09 15:07:49
阅读次数:
186
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-11-09 15:04:28
阅读次数:
180