题目:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,...
分类:
其他好文 时间:
2015-05-14 11:23:11
阅读次数:
100
Maximum Depth of Binary Tree
Total Accepted: 63668 Total Submissions: 141121 My Submissions
Question Solution Given a binary tree, find its maximum depth.The maximum depth is the number of nodes...
分类:
其他好文 时间:
2015-05-13 23:19:39
阅读次数:
302
题目:Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1]...
分类:
其他好文 时间:
2015-05-13 23:12:07
阅读次数:
113
题目描述:
everse bits of a given 32 bits unsigned integer.
For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as00...
分类:
其他好文 时间:
2015-05-13 22:07:09
阅读次数:
217
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value./**
* Definition...
分类:
其他好文 时间:
2015-05-13 22:02:26
阅读次数:
156
最近想写一些关于红黑树的博客,既想写的全面,又直观,但是又不知道从哪里入手。斟酌再三,还是从最简单的二叉排序树开始写。
二叉排序树(Binary Sort Tree)又叫二叉查找树。它是一种特殊结构的二叉树。其或为空树,或具备下列性质:
(1)若它的左子树不为空,则左子树上所有结点的值均小于它的根节点的值。
(2)若它的右子树不为空,则左子树上所有结点的值均大于它的根节点的值。
显然,它的...
分类:
编程语言 时间:
2015-05-13 22:00:17
阅读次数:
208
题目:Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].N...
分类:
其他好文 时间:
2015-05-13 21:39:39
阅读次数:
126
题目:Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3]....
分类:
其他好文 时间:
2015-05-13 21:31:37
阅读次数:
109
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node./**
* Definition for binary tree
* stru...
分类:
其他好文 时间:
2015-05-13 19:42:48
阅读次数:
143
我们知道在.NET中我们有多种对象序列化的方式,如XML方式序列化、Binary序列化,其中XML序列化是一种比较通用的在各语言之间传递数据的方式。除了这两种序列化方式之外,在.NET中还可以使用JSON序列化。JSON(JavaScript Object Notation)是一种轻量级轻量级的数据...
分类:
Web程序 时间:
2015-05-13 19:21:25
阅读次数:
187