码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
12.C#对象序列化与反序列化
1.对象序列化的介绍(1).NET支持对象序列化的几种方式 二进制序列化:对象序列化之后是二进制形式的,通过BinaryFormatter类来实现的,这个类位于System.Runtime.Serialization.Formatters.Binary命名空间下。 SOAP序列化: 对象序列化之后的...
分类:Windows程序   时间:2015-03-05 20:57:48    阅读次数:176
1043. Is It a Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than the node's key. The righ...
分类:其他好文   时间:2015-03-05 17:08:50    阅读次数:178
Binary Tree Inorder Traversal
For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2]./** * Definition for binary tree * public class TreeNode { * int val;...
分类:其他好文   时间:2015-03-05 16:33:09    阅读次数:128
Flatten Binary Tree to Linked List
https://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/Given a binary tree, flatten it to a linked list in-place.For example,Given ...
分类:其他好文   时间:2015-03-05 16:22:32    阅读次数:192
Convertion of grey code and binary 格雷码和二进制数之间的转换
以下转换代码摘自维基百科 Wikipedia:/* The purpose of this function is to convert an unsigned binary number to reflected binary Gray code. Th...
分类:其他好文   时间:2015-03-05 14:38:54    阅读次数:171
[LeetCode] Grey Code 格雷码
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total numb...
分类:其他好文   时间:2015-03-05 14:34:25    阅读次数:127
有序环形数列的查找问题
问题:有一个有序的环形数列,从小到大排好了,比如4, 5, 6, 1, 2, 3,从第四个位置开始当成环形看,就是一个有序数列1, 2, 3, 4, 5, 6。问题是在这个数列重找到给定的关键字。看到有序,自然想到binary search。这个问题可以用binary search做,每次二分,把数...
分类:其他好文   时间:2015-03-05 12:29:25    阅读次数:139
Lintcode: Insert Node in a Binary Search Tree
Given a binary search tree and a new tree node, insert the node into the tree. You should keep the tree still be a valid binary search tree.ExampleGi....
分类:其他好文   时间:2015-03-05 06:50:40    阅读次数:143
【转】STL之二分查找 (Binary search in STL)
转载注明出处:http://blog.csdn.net/non_cease/article/details/7989521正确区分不同的查找算法count,find,binary_search,lower_bound,upper_bound,equal_range本文是对Effective STL第...
分类:其他好文   时间:2015-03-04 18:29:37    阅读次数:105
【LeetCode从零单排】No104 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 * p...
分类:其他好文   时间:2015-03-04 17:08:21    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!