问题:将二叉树的所有结点指向他的右边的一个结点分析:对于每一个结点来说,其操作都是一样的,除了他的左儿子指向右儿子外,其左儿子的全部右后辈均指向其右儿子的全部左后辈/** * Definition for binary tree with next pointer. * struct TreeLin...
分类:
其他好文 时间:
2014-08-03 10:12:05
阅读次数:
178
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
...
分类:
其他好文 时间:
2014-08-02 23:32:04
阅读次数:
232
题目来源:POJ 2356 Find a multiple
题意:n个数 选出任意个数 使得这些数的和是n的倍数
思路:肯定有解 并且解是连续的一段数
证明:
假设有m个数 a1,a2,a3...am s1 s2 s3...sm为前缀和 s1 = a1 s2 = a1+a2 s3 = a1+a2+a3... sm = a1+a2+a3+...+am
1.如果某个前缀和si%m =...
分类:
其他好文 时间:
2014-08-02 21:01:54
阅读次数:
312
作为一名Android应用开发程序猿,最痛苦的事莫过于在屏幕适配了,这与历史原因有关,具体就不深究了。直到最近才搞明白dpi是怎么换算的,在开发的过程中,一个应用运行的屏幕标准应该是分辨率为320x480密度为160dpi的屏幕上,所以所有放在drawable、drawable-mdpi、value...
分类:
移动开发 时间:
2014-08-02 18:11:23
阅读次数:
314
In a typical multiple-tier implementation, the steps for creating and refreshing a DataSet, and in turn, updating the original data are to:Build and f...
分类:
其他好文 时间:
2014-08-02 15:17:43
阅读次数:
225
问题:二叉树中序遍历递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) :...
分类:
其他好文 时间:
2014-08-02 12:40:33
阅读次数:
162
$ adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X install pathto/myapp-release.apk
分类:
移动开发 时间:
2014-08-02 12:30:23
阅读次数:
181
1. 2D射影几何与变换这一章的内容主要在介绍一些基本的几何概念和几何符号,以便理解后文中的内容。更具体的来说,主要包含了平面射影变换的几何知识。1.1 平面几何平面几何是个非常简单的概念,无非是点,线,再就是点和线之间的关系。1.2 2D射影平面(Projective plane)众所周知,在平面...
分类:
其他好文 时间:
2014-08-02 01:47:12
阅读次数:
194
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
/**
* Definition for binary tree
* struct TreeNode {...
分类:
其他好文 时间:
2014-08-01 19:53:32
阅读次数:
222
kendo ui grid 多次添加数据 ,multiple create...
分类:
其他好文 时间:
2014-08-01 19:44:22
阅读次数:
371