几种树:(1)平衡树:package com.jp.algorithm.tree;import java.util.Iterator;import java.util.NoSuchElementException;/** * 平衡二叉树 * * 定义:首先它是一种特殊的二叉排序树,其次它的左子树和....
分类:
其他好文 时间:
2014-06-28 17:14:17
阅读次数:
156
bst :binary search tree(二叉搜索树)对于树中的每个节点n,左子树中的所有节点的关键字都小于节点n的关键字,右子树中所有节点的关键字都大于节点n的关键字struct node{ int key; struct node *left; //左节点 s...
分类:
其他好文 时间:
2014-06-28 17:06:24
阅读次数:
186
题目:Binary Tree Level Order Traversal i iii和ii的差别仅在于最后将结果逆序一下就行了,算法上基本相同个人思路:1、二叉树的层次遍历,我们一层一层地处理,用一个队列(A队列)将每一层的所有节点按照从左到右的顺序入队2、待该队列的所有节点都出队,并且用另外一个队...
分类:
其他好文 时间:
2014-06-28 17:01:33
阅读次数:
235
https://oj.leetcode.com/problems/trapping-rain-water/模拟题,计算出在凹凸处存水量。对于一个位置 i ,分别计算出它左边的最大值 left (从左扫描一遍), 右边的最大值 right(从右扫描一遍) 。找left right中的最小值,如果大于 ...
分类:
移动开发 时间:
2014-06-28 16:32:30
阅读次数:
222
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:
其他好文 时间:
2014-06-28 16:02:43
阅读次数:
214
【Tags and Layers】1、tags and layers 配置面板。"Edit" -> "Project Settings" -> "Tags and Layers"来打开设置面板。 2、tag可以理解为一类元素的标记,如hero、enemy、apple-tree等。通过设置tag,可....
分类:
其他好文 时间:
2014-06-28 16:00:08
阅读次数:
264
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-28 15:55:58
阅读次数:
196
一、排序 select * from employees order by name; 字符型默认字符顺序(也就是说z永远比a大),不管大小写;如果想按编码值排序(也就是说小写永远大于大写),则使用 select * from employees order by binary name;二、...
分类:
数据库 时间:
2014-06-20 18:00:44
阅读次数:
278
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2014-06-20 15:30:19
阅读次数:
227
框架页面如下: 在tree页面中想要刷新opertop页面内容,两种方法:第一种:...
分类:
其他好文 时间:
2014-06-20 14:46:59
阅读次数:
121