I am lazy so I did not clear the two dynamic allowcated . 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ...
分类:
其他好文 时间:
2015-03-21 18:33:56
阅读次数:
163
Notes:1. If len dp(len+1, 0); 7 vector > rec(len, vector(len, false)); 8 for (int i = 0; i = 0; i--) {10 for (int j = i; ...
分类:
其他好文 时间:
2015-03-21 18:25:43
阅读次数:
136
1 class Solution { 2 public: 3 bool isP(string s) { 4 int start = 0, end = s.size()-1; 5 while (start > &result, vector current,...
分类:
其他好文 时间:
2015-03-21 17:02:38
阅读次数:
116
1. x/rec >= 10.2. find start and end of a number. 1 class Solution { 2 public: 3 bool isPalindrome(int x) { 4 if (x = 10) rec *= 10; 7 ...
分类:
其他好文 时间:
2015-03-21 16:54:58
阅读次数:
122
什么是磁盘分区? 磁盘分区是使用分区编辑器(partition editor)在磁盘上划分几个逻辑部分,盘片一旦划分成数个分区(Partition),不同类的目录与文件可以存储进不同的分区。 分区,是对磁盘的一种格式化。 创建分区时,就已经设置好了硬盘的各项物理参数,指定了硬盘主引导记录MBR和引导...
分类:
其他好文 时间:
2015-03-21 12:29:37
阅读次数:
137
poj1159——回文,lcsPalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:54621Accepted:18892DescriptionA palindrome is a symmetrical string, tha...
分类:
其他好文 时间:
2015-03-21 06:21:20
阅读次数:
160
select * from(select c.company_id, c.company_name_1 C, a.address_line_1_soundex A , rank() over (partition by c.company_id, a.address_line_1_soundex.....
分类:
其他好文 时间:
2015-03-20 18:25:13
阅读次数:
135
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2015-03-20 12:19:32
阅读次数:
132
Kinda similar with another palindrome DP from LeetCode. Feel it, it is a bottom-up DP - palindrome subsequence.str = input()slen = len(str)dp = [[0 fo...
分类:
其他好文 时间:
2015-03-20 06:45:44
阅读次数:
107
转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraud求最长回文子串。http://acm.timus.ru/problem.aspx?space=1&num=1297Manacher模板题,复杂度O(n),做这题纯属是为了验一下自己写的模板是否正确。当然这...
分类:
其他好文 时间:
2015-03-20 01:22:43
阅读次数:
202