1205 - Palindromic Numbers PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB A palindromic number or numeral palindrome is a ...
分类:
其他好文 时间:
2017-10-15 22:25:59
阅读次数:
240
题意:给定一个字符串,问它的集合中有多少个回文串。 析:dp[i][j] 表示区间 i 到 j,有多少个回文串, 如果 s[i] == s[j] dp[i][j] = dp[i+1][j] + dp[i][j-1] + 1。 否则 dp[i][j] = dp[i+1][j] + dp[i][j-1] ...
分类:
其他好文 时间:
2017-10-15 19:41:21
阅读次数:
148
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison ...
分类:
其他好文 时间:
2017-10-14 01:21:42
阅读次数:
137
不管是YGC还是Full GC,GC过程中都会对导致程序运行中中断,正确的选择不同的GC策略,调整JVM、GC的参数,可以极大的减少由于GC工作,而导致的程序运行中断方面的问题,进而适当的提高Java程序的工作效率。但是调整GC是以个极为复杂的过程,由于各个程序具备不同的特点,如:web和GUI程序 ...
分类:
其他好文 时间:
2017-10-10 14:43:20
阅读次数:
179
Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindro ...
分类:
其他好文 时间:
2017-10-10 13:16:58
阅读次数:
132
9. Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative int ...
分类:
其他好文 时间:
2017-10-09 14:20:54
阅读次数:
153
惊讶!学会这些625单词就可以走遍天下! (动物) Animal: dog, cat, fish, bird, cow, pig, mouse, horse, wing, animal (交通) Transportation: train, plane, car, truck, bicycle, b ...
分类:
其他好文 时间:
2017-10-08 12:13:50
阅读次数:
2400
class Solution { public int minCut(String s) { int[] dp=new int[s.length()+1]; for(int i=0;i=0&&i+len=0&&i+len<s.length()&&s.charAt(i-1-len)==s.charAt... ...
分类:
其他好文 时间:
2017-10-05 11:02:55
阅读次数:
115
class Solution { public List> partition(String s) { List> res=new ArrayList>(); generatePartition(0,new ArrayList(),res,s); return res; } private void... ...
分类:
其他好文 时间:
2017-10-05 11:02:25
阅读次数:
143
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl ...
分类:
其他好文 时间:
2017-10-03 00:52:13
阅读次数:
157