#414. Third Maximum Number Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximu ...
分类:
其他好文 时间:
2016-11-21 08:36:22
阅读次数:
186
探究移动端web开发 什么使移动端开发呢?这就是在手机等移动端设备上的网页开发。而当今比较流行的通过rem进行移动端的适配,所以这篇文章会主要介绍一些基本概念以及rem适配方案。 第一部分:基本概念 物理像素:这个就是在屏幕上可以控制的最小显示单位,比如显示颜色的最小单位。 css像素: 就是我们在 ...
分类:
移动开发 时间:
2016-11-20 16:00:17
阅读次数:
256
Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm th ...
分类:
其他好文 时间:
2016-11-20 07:01:22
阅读次数:
251
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],t ...
分类:
编程语言 时间:
2016-11-19 02:09:34
阅读次数:
198
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 求二维平面上n个点中,最多共线的点数。 1、比较直观的方法是,三层循环,以任意两点划线,判断第三个点 ...
分类:
其他好文 时间:
2016-11-18 17:51:55
阅读次数:
203
Given a string S and a string T, count the number of distinct subsequences of T in S. (Hard) A subsequence of a string is a new string which is formed ...
分类:
其他好文 时间:
2016-11-17 23:44:23
阅读次数:
208
获取当前日期: public class TestDate { public static void main(String[] args) { Date now = new Date(); Calendar cal = Calendar.getInstance(); } 获取当月最后一天: pub ...
分类:
其他好文 时间:
2016-11-17 20:30:02
阅读次数:
214
【题目链接】 http://poj.org/problem?id=3061 【题目大意】 给出S和一个长度为n的数列,问最短大于等于S的子区间的长度。 【题解】 利用双指针获取每一个恰好大于等于S的子区间,更新答案即可。 【代码】 ...
分类:
其他好文 时间:
2016-11-17 01:49:32
阅读次数:
135
<appender name="DebugAppender" type="log4net.Appender.RollingFileAppender"> <file value="log\debug\"/> <appendToFile value="true" /> <rollingStyle val ...
分类:
Web程序 时间:
2016-11-16 22:00:54
阅读次数:
433