题意:添加尽量少的字符使得s串成为回文串,并输出这样得解。 题解:dp[ i ][ j ]表示i~j串需要添加的最少字符。 当s[ i ]==s[ j ]时,dp[ i ][ j ]=dp[ i +1 ][ j - 1 ]; 当s[ i ]! =s[ j ]时,dp[ i ][ j ]=min( d ...
分类:
其他好文 时间:
2017-08-08 00:26:05
阅读次数:
225
Hadoop家族学习路线图 Hadoop家族系列文章,主要介绍Hadoop家族产品,常用的项目包括Hadoop, Hive, Pig, HBase, Sqoop, Mahout, Zookeeper, Avro, Ambari, Chukwa,新增加的项目包括,YARN, Hcatalog, Ooz ...
分类:
其他好文 时间:
2017-08-07 10:16:29
阅读次数:
165
Total Accepted: 40445 Total Submissions: 148124 Difficulty: Easy Given a singly linked list, determine if it is a palindrome. Follow up: Could you do ...
分类:
其他好文 时间:
2017-08-06 14:14:49
阅读次数:
197
题目意思:给一个字符串和每个字母删除、插入的代价,求把它变成回文串的最小代价 dp[i][j] 表示 区间 i~j 的子串变成回文串需要的最小代价。 设字符串 ab....cd 如果 a == d,则将其变成回文串的最小代价就是将 b....c 变成回文串 如果 a != d,考虑如下四种情况 在左 ...
分类:
其他好文 时间:
2017-08-05 18:54:37
阅读次数:
108
RobotFramework一直没去尝试使用,今天刚好有这个需要,简单安装使用下。(以下RF=RobotFramework) 想使用此安装步骤的前提是有python环境 并且python+selenium可以正常使用,这2部分的安装不在赘述。 1、cmd命令窗口进入 D:\Python27\Scri ...
分类:
其他好文 时间:
2017-08-05 06:02:12
阅读次数:
227
A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem yo ...
分类:
其他好文 时间:
2017-08-04 13:44:41
阅读次数:
438
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-08-01 20:54:49
阅读次数:
161
Determine whether an integer is a palindrome. Do this without extra space. 题目:推断int数据是否为回文数 注意:负数不是回文数,0是最小的回文数 思路:此题和前面一道 求int数的反序差点儿相同http://blog.cs ...
分类:
其他好文 时间:
2017-08-01 09:15:39
阅读次数:
171
E. Pig and Palindromes Peppa the Pig was walking and walked into the forest. What a strange coincidence! The forest has the shape of a rectangle, cons ...
分类:
其他好文 时间:
2017-07-29 18:58:41
阅读次数:
163