The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:
其他好文 时间:
2015-03-06 15:34:13
阅读次数:
153
1.题目描述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.2.解决方案1class Solution {
public:...
分类:
其他好文 时间:
2015-03-06 11:22:23
阅读次数:
126
问题描述:对数组元素进行查找与排序,利用二分法与递归实现。完整实例1:publicclassSortDemo
{
publicstaticvoidmain(String[]args)
{
int[]arr={10,2,300,41,15,6};
for(inta:arr)
{
System.out.print("["+a+"]");
}
//newSortDemo().insertSort(arr);
newSortDemo().binary..
分类:
编程语言 时间:
2015-03-06 06:25:16
阅读次数:
188
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou...
分类:
其他好文 时间:
2015-03-06 00:57:57
阅读次数:
152
转自:http://unix.stackexchange.com/questions/5719/linux-gnu-gcc-ld-version-scripts-and-the-elf-binary-format-how-does-it-wor/10317#10317First of all, EL...
分类:
其他好文 时间:
2015-03-05 22:10:06
阅读次数:
223
1.对象序列化的介绍(1).NET支持对象序列化的几种方式 二进制序列化:对象序列化之后是二进制形式的,通过BinaryFormatter类来实现的,这个类位于System.Runtime.Serialization.Formatters.Binary命名空间下。 SOAP序列化: 对象序列化之后的...
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
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
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
以下转换代码摘自维基百科 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