码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
【Binary Tree Level Order Traversal】cpp
题目: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
leetcode 104 Maximum Depth of Binary Tree二叉树求深度
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
【Binary Tree Post order Traversal】cpp
题目: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
leetcod--Reverse Bits
题目描述: 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
same-tree
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
从二叉排序树到平衡二叉树再到红黑树系列1
最近想写一些关于红黑树的博客,既想写的全面,又直观,但是又不知道从哪里入手。斟酌再三,还是从最简单的二叉排序树开始写。 二叉排序树(Binary Sort Tree)又叫二叉查找树。它是一种特殊结构的二叉树。其或为空树,或具备下列性质: (1)若它的左子树不为空,则左子树上所有结点的值均小于它的根节点的值。 (2)若它的右子树不为空,则左子树上所有结点的值均大于它的根节点的值。 显然,它的...
分类:编程语言   时间:2015-05-13 22:00:17    阅读次数:208
【Binary Tree Inorder Traversal】cpp
题目: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
【Binary Tree Preorder Traversal】cpp
题目: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
maximum-depth-of-binary-tree
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使用JSON作为数据交换格式
我们知道在.NET中我们有多种对象序列化的方式,如XML方式序列化、Binary序列化,其中XML序列化是一种比较通用的在各语言之间传递数据的方式。除了这两种序列化方式之外,在.NET中还可以使用JSON序列化。JSON(JavaScript Object Notation)是一种轻量级轻量级的数据...
分类:Web程序   时间:2015-05-13 19:21:25    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!