Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-07-19 10:00:25
阅读次数:
125
from?https://leetcode.com/problems/sliding-window-maximum/ Given an array?nums, there is a sliding window of size?k?which is moving from the very left of the array to the very right. You can on...
题目:
Sliding Window Maximum
Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the win...
Given an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers ...
问题:Arduino:1.6.3 (Windows 7), 板:"Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)"Sketch uses 846 bytes (2%) of program storage space. Maximum is 30,72...
分类:
其他好文 时间:
2015-07-18 10:58:20
阅读次数:
593
对于每个元素,最理想的情况就是都在它的左边或者右边,那么sort一下就可以得到一个解了,然后大的中间不能有小的元素,因为如果有的话,那么无论选小的还是选大的都不是最优。对小的元素来说,比它大的元素在哪里是没有关系的。所以把大的看作一个整体,然后插空一下就得出解了。注意llu#include#incl...
分类:
其他好文 时间:
2015-07-18 00:28:41
阅读次数:
141
??
题意:给定n个数,求两段连续不重叠子段的最大和。
思路很简单,把原串划为两段,求两段的连续最大子串和之和,这里要先预处理一下,用lmax数组表示1到i的最大连续子串和,用rmax数组表示n到i的最大连续子串和,这样将时间复杂度降为O(n)。
#include
#include
#include
#include
#include
#include
#includ...
分类:
其他好文 时间:
2015-07-17 09:59:18
阅读次数:
130
【称号】Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may comple...
分类:
其他好文 时间:
2015-07-17 09:37:45
阅读次数:
115
昨天系统出现了一个比较奇怪的BUG,表单提交后,数据没有全部执行。查看tomcat日志发现有以下警告:18:52:23,058WARNHttpMethodBase:682-Goingtobufferresponsebodyoflargeorunknownsize.UsinggetResponseBodyAsStreaminsteadisrecommended.18:52:31,290WARNHttpMethodBase:682..
分类:
其他好文 时间:
2015-07-16 22:36:38
阅读次数:
199
网上很多同行应该都遇到过这个问题,百度一搜 千篇一律的处理办法,就是加大进程数。但是我这边情况不一样,因为我的Oracle 11g是早上刚装的,跟本没人用,我用PLSQL链接照样说不能链接。我就在想,到底哪里出了问题,很郁闷。最后我就想,是不是跟服务启动的数量有关系?如下图:结果就是服务一停掉,马上...
分类:
数据库 时间:
2015-07-16 19:18:51
阅读次数:
210