题目描述:(链接)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 fa...
分类:
其他好文 时间:
2015-10-21 12:03:10
阅读次数:
161
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2015-10-21 06:52:27
阅读次数:
225
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2015-10-21 06:51:01
阅读次数:
173
题目:Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in ...
分类:
编程语言 时间:
2015-10-21 00:05:15
阅读次数:
251
一、二叉搜索树概览 二叉搜索树(又名二叉查找树、二叉排序树)是一种可提供良好搜寻效率的树形结构,支持动态集合操作,所谓动态集合操作,就是Search、Maximum、Minimum、Insert、Delete等操作,二叉搜索树可以保证这些操作在对数时间内完成。当然,在最坏情况下,即所有节点形成一种....
分类:
编程语言 时间:
2015-10-20 22:53:17
阅读次数:
369
1、页面meta之viewportwidth可是宽度,initial-scale初始化缩放比例maximum-scale允许用户缩放的最大比例minimum-scale允许用户缩放的最小比例user-scalable是否允许用户缩放2、关闭iOS键盘首字母自动大写 IOS的机子,默认英文输入法状态下...
分类:
移动开发 时间:
2015-10-20 19:29:21
阅读次数:
243
这道题是lintcode上的一道题,当然leetcode上同样有。本题需要寻找O(N)复杂度的算法。解体思路比较有特点,所以容易想到参考 最小栈 的解题办法。但是最小栈用栈维护最小值很直观,这道题是队列,用什么数据结构好呢?也许看完暴力解会有点启发。但是思路还是一样的,最大的要在最前面(直接获取结果...
我自己的做稿子的时候,一开始就有一个习惯,先放上这段代码未隐藏URL栏已隐藏URL栏1:1显示(initial-scale=1.0, maximum-scale=1.0),禁止放大缩小(user-scalable=no)隐藏IOS系统浏览器的URL栏目与状态栏目(minimal-ui,只有IOS7版...
分类:
移动开发 时间:
2015-10-20 11:53:11
阅读次数:
221
A variantion to "largest\smallest consecutive subarray". Idea is, at position i, the current max diff is max(max_left[i] - min_right[i+1], max_right[i...
分类:
其他好文 时间:
2015-10-18 14:01:57
阅读次数:
174
这道题和Minimum Depth of Binary Tree一题相似,这个是求最大深度的,就是对二叉树进行递归,然后将子树的最大深度进行返回,最终得到这个树的最大深度。...
分类:
其他好文 时间:
2015-10-17 23:48:57
阅读次数:
345