package chap10;import static
org.junit.Assert.*;import java.util.Stack;import org.junit.Test;public class
exec10_4_4 { /** * 将该树打印 * * @param tree */ ...
分类:
其他好文 时间:
2014-06-16 10:58:06
阅读次数:
183
Description :Given a singly linked list where
elements are sorted in ascending order, convert it to a height balanced
BST.分析:这道题目简单版是把一个排序好的数组转成平衡的二叉树...
分类:
其他好文 时间:
2014-06-16 10:51:54
阅读次数:
237
持续添加中。。。1 快排 1 void QuickSort(int data[],int
left,int right) 2 { 3 4 if(left=temp)14 j--;15 16 data[i]=data[j];17 18 ...
分类:
其他好文 时间:
2014-06-16 08:25:32
阅读次数:
221
原题地址:https://oj.leetcode.com/problems/gray-code/题意:The
gray code is a binary numeral system where two successive values differ in only
one bit.Given a...
分类:
编程语言 时间:
2014-06-16 07:42:27
阅读次数:
242
%开始字体设置\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
\setCJKsansfont{SimHei}\setCJKmonofont{[SIMFANG.TTF]}\setCJKfamilyfont{zhsong}{Si...
分类:
其他好文 时间:
2014-06-16 07:30:08
阅读次数:
219
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...
分类:
其他好文 时间:
2014-06-12 08:10:28
阅读次数:
194
堆(heap) 亦被称为:优先队列(priority
queue),是计算机科学中一类特殊的数据结构的统称。堆通常是一个可以被看做一棵树的数组对象。在队列中,调度程序反复提取队列中第一个作业并运行,因而实际情况中某些时间较短的任务将等待很长时间才能结束,或者某些不短小,但具有重要性的作业,同样应当....
分类:
其他好文 时间:
2014-06-12 06:08:10
阅读次数:
465