Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:
其他好文 时间:
2014-12-01 23:45:12
阅读次数:
245
动态规划Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes...
分类:
其他好文 时间:
2014-12-01 20:48:25
阅读次数:
250
UPDATE i18nresource tar INNER JOIN (SELECT substring_index(resourceValue,'Card',1) val,id FROM i18nresource where resourceKey like'%Card') tempON tar....
分类:
数据库 时间:
2014-12-01 19:05:06
阅读次数:
148
You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati...
分类:
其他好文 时间:
2014-12-01 12:43:08
阅读次数:
214
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-11-30 21:18:12
阅读次数:
167
任务是判断可能出现的情况:1.空格2.空指针3.首字符是04.首字符是“+”或“-”5.判断边界条件,上界INT_MAX=2147483647,下届INT_MIN=-2147483648,小心判断 1 // 2 // main.cpp 3 // Longest Substring 4 // ...
分类:
其他好文 时间:
2014-11-30 14:07:58
阅读次数:
163
最长上升子序列(Longest Increasing Subsquence)是指对一个序列,其中满足i
LIS普遍求法为动态规划。有两种算法。
第一种比较好写,复杂度O(n^2)。
设原序列为a[]。所有下标从1开始(即[1,n])。定义dp[i]为以a[i]结尾的最长上升子序列的长度。很容易得到转移方程:dp[i] = max{1, dp[j] + 1} 且 j
dp[i] = 1;...
分类:
编程语言 时间:
2014-11-30 12:37:30
阅读次数:
198
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BAN...
分类:
编程语言 时间:
2014-11-30 10:22:33
阅读次数:
241
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-11-30 07:04:09
阅读次数:
163
Write a function to find the longest common prefix string amongst an array of strings.Solution: 1 public class Solution { 2 public String longestC...
分类:
其他好文 时间:
2014-11-29 11:35:58
阅读次数:
165