Question:Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The fl...
分类:
其他好文 时间:
2015-08-08 01:10:06
阅读次数:
130
Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, except...
分类:
其他好文 时间:
2015-08-07 23:53:56
阅读次数:
135
4.7 Design an algorithm and write code to find the first common ancestor of two nodes in a binary tree. Avoid storing additional nodes in a data struc...
分类:
其他好文 时间:
2015-08-07 23:47:47
阅读次数:
208
Caused by: java.lang.IllegalArgumentException: Binary XML file line #7: Must specify unique android:id, android:tag, or have a parent with an id for com.mama.fragment.Fragment1...
分类:
移动开发 时间:
2015-08-07 22:27:42
阅读次数:
169
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr...
分类:
其他好文 时间:
2015-08-07 21:54:10
阅读次数:
116
题目地址:E. Paths and Trees
模拟了一场CF,这场实在太水了。。边玩边做的。。最后半分钟交了一发E题。。不幸AK绝杀失败。。。。
首先的思路肯定是先求最短路,把可能为最短路的边挑出来,然后第二步我本来写的是直接用无向图的最小生成树,于是绝杀失败。。。后来才发现这样是不行的。。因为边是有向边,而且每个点的入度要保证只有一个才行。于是我就把最小生成树的边弄成有向边,然后判定一下每个...
分类:
其他好文 时间:
2015-08-07 20:12:32
阅读次数:
135
来自:http://www.acmerblog.com/ubiquitous-binary-search-5345.html我们都知道二分查找算法,实际上二分查找以及其扩展应用是很广泛的。这里收集了一些和二分查找有关的有趣问题。强烈建议大家看完问题后最小化浏览器,先尝试自己去解决,然后再看代码,问题...
分类:
其他好文 时间:
2015-08-07 19:00:43
阅读次数:
120
Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, except...
分类:
其他好文 时间:
2015-08-07 19:00:01
阅读次数:
139
Binary Tree Zigzag Level Order Traversal
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alte...
分类:
其他好文 时间:
2015-08-07 14:52:28
阅读次数:
117
留一下配置文件(以后陆续更新):set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswinset diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase...
分类:
系统相关 时间:
2015-08-07 14:45:12
阅读次数:
156