[问题描述]Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioni...
分类:
其他好文 时间:
2014-10-07 01:23:32
阅读次数:
341
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...
分类:
其他好文 时间:
2014-10-07 00:32:12
阅读次数:
237
谋事在人,成事在天[问题描述]Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.F...
分类:
其他好文 时间:
2014-10-07 00:28:22
阅读次数:
232
leetcode 经典题Minimum Window Substring ,很巧妙算法。...
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-10-06 14:58:50
阅读次数:
148
[leetcode]Given a string s, partition s such that every substring of the partition is a palindrome....
分类:
其他好文 时间:
2014-10-06 12:19:50
阅读次数:
200
【leetcode】Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s....
分类:
其他好文 时间:
2014-10-06 12:12:00
阅读次数:
149
论文里面的神题,题意大概是找出当前字符串中的一个子串,使得这个子串由N个字符串循环构成,输出N最大的子串,如果有多输出字典序最小的一个。解决方法感觉很犀利。。首先,对于循环节长度为L的子串,必然有这个子串会经过str[0],str[L],str[2*L]...中的任意两个字符,也就是必然会经过str...
分类:
其他好文 时间:
2014-10-04 23:57:07
阅读次数:
319
例一:String.indexOf(String x):字符串x在字符串中第一次出现的下表索引,若不存在“x”,就返回-1String.substring(int beginindex):从字符串索引为beginindex開始截取,包含该索引String str = "陕西省|西安市|雁塔区";Sy...
分类:
其他好文 时间:
2014-10-04 14:46:26
阅读次数:
185
https://oj.leetcode.com/problems/minimum-window-substring/线性复杂度的限制下,考虑使用滑动窗口法。这个方法的思路就是维持一个窗口,窗口向右边界扩张以满足限制条件。窗口左边界收缩以尽量使其最小。注意这个题目可能是一个典型的滑动窗口方法的实现。外...