Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee ...
分类:
其他好文 时间:
2017-07-01 09:48:49
阅读次数:
226
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 num ...
分类:
其他好文 时间:
2017-07-01 09:47:51
阅读次数:
145
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a ...
分类:
其他好文 时间:
2017-07-01 01:08:01
阅读次数:
232
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only ...
分类:
其他好文 时间:
2017-07-01 01:00:31
阅读次数:
275
hadoop官网 我以Hadoop 2.7.3为例. hadoop 2.7.3 官网 . hadoop 2.7.3 官网下载页面 . 包括源码(source)和二进制(binary)文件, 其中二进制(binary)文件文件对应hadoop-2.7.3.tar.gz, 是已经编译好的,可以直接进行部 ...
分类:
其他好文 时间:
2017-06-30 11:10:17
阅读次数:
140
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte ...
分类:
其他好文 时间:
2017-06-30 00:59:02
阅读次数:
161
序列化技术的主要两个目的是:持久化存储、按值封送。 .NET Framework支持三种序列化器:Binary、XML、SOAP.他们各有优缺点,分别列如下 1. Binary序列化是完全保真的,因为除非特殊声明为NonSerialized,那么所有成员(包括私有的和公有的)都会被序列化。该序列化器 ...
分类:
其他好文 时间:
2017-06-29 22:25:53
阅读次数:
182
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题意:将已排序的数组转成高度平衡的搜索二叉树。 思路:这题和Convert sorted list to ...
分类:
其他好文 时间:
2017-06-29 22:19:33
阅读次数:
109
非常easy的题目。只是还是认为要说一下。最小深度。非常快想到bfs,层序遍历嘛。本科的时候实在是没写过多少代码,一開始竟然想不到怎么保存一层的信息。后来想到能够压入一个特殊的对象,每次到达这个对象就知道是一层了。我用的是空指针。认为这个适用性还是不错的。一层的节点入队结束后,应该压入一个NULL。 ...
分类:
其他好文 时间:
2017-06-29 10:02:53
阅读次数:
120
1.安装pip:sudo apt-get install python-pip python-dev 2.定义仅支持CPU的python2.7环境下TensorFlow安装包地址:export TF_BINARY_URL=https://storage.googleapis.com/tensorfl ...
分类:
其他好文 时间:
2017-06-29 10:01:20
阅读次数:
113