Given an integer array with no duplicates. A max tree building on this array is defined as follow: The root is the maximum number in the array The lef ...
分类:
其他好文 时间:
2016-06-15 23:46:56
阅读次数:
322
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />是否允许缩放<meta name="apple-to ...
分类:
移动开发 时间:
2016-06-15 10:28:51
阅读次数:
157
题目描述: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,- ...
分类:
其他好文 时间:
2016-06-14 17:32:36
阅读次数:
142
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. /** * Definition for a point. * struct Point { * i ...
分类:
其他好文 时间:
2016-06-14 15:34:52
阅读次数:
134
https://leetcode.com/problems/maximum-subarray/ 题目大意:找出一个int型数组中连续的子串,使得在所有子串中该子串之和最大,求出和。例如:数组为[?2,1,?3,4,?1,2,1,?5,4],求得的子串为:[4,?1,2,1],得到的最大和为:6。 解 ...
分类:
其他好文 时间:
2016-06-14 11:35:30
阅读次数:
116
32个最重要的算法 奥地利符号计算研究所(Research Institute for Symbolic Computation,简称RISC)做了一个调查,投票选出32个最重要的算法: 19. 最大流量算法(Maximum flow)——该算法试图从一个流量网络中找到最大的流。它优势被定义为找到这 ...
分类:
编程语言 时间:
2016-06-12 18:41:29
阅读次数:
212
题目链接:https://leetcode.com/problems/max-points-on-a-line/
题目:
Given n points
on a 2D plane, find the maximum number of points that lie on the same straight line.
思路:
对所有可以配对的点计算他们之间的斜率,并保存。时间...
分类:
其他好文 时间:
2016-06-12 02:41:43
阅读次数:
143
文件操作:二进制文件和文本文件的区别。二进制文件将数据在内存中存在的模式原封不动的搬到文件中,而文本文件是将数据的asc码搬到文件中。首先做一个读写文件的菜单,在CxxView里响应1.C的方式:fwrite:size:Item size in bytes 每次写多少个字节count:Maximum ...
分类:
编程语言 时间:
2016-06-10 19:02:44
阅读次数:
245
题目链接:https://leetcode.com/problems/binary-tree-maximum-path-sum/题目:
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...
分类:
其他好文 时间:
2016-06-10 11:08:38
阅读次数:
168