码迷,mamicode.com
首页 >  
搜索关键字:palindromic    ( 595个结果
LeetCode 5. Longest Palindromic Substring(medium难度)
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 当然还有更逆天的算法,来自dis ...
分类:其他好文   时间:2017-12-13 00:07:17    阅读次数:139
[LeetCode] 5 Longest Palindromic Substring
题目地址: https://leetcode.com/problems/longest-palindromic-substring/description/ 题目: 其实就是求一个字符串的最长回文子字符串。 解法: 我首先采取了暴力解法,不出意料地TLE了。这是超时的TLE解法: 这类题目一看就是用 ...
分类:其他好文   时间:2017-12-03 18:08:43    阅读次数:134
LeetCode 5: Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 题目描述:给定字符串,求出最大的 ...
分类:其他好文   时间:2017-12-03 17:12:36    阅读次数:111
leetcode5- Longest Palindromic Substring- medium
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 1. O(n2 * l)复杂度做 ...
分类:其他好文   时间:2017-12-02 11:15:19    阅读次数:120
1024. Palindromic Number (25)
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number ...
分类:其他好文   时间:2017-12-01 23:27:19    阅读次数:106
[LeetCode] Count Different Palindromic Subsequences 计数不同的回文子序列的个数
Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. A subsequence of a str ...
分类:其他好文   时间:2017-12-01 15:13:58    阅读次数:766
5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: 寻找最长回文字符串。 用动态规划。dp[i][j] ...
分类:其他好文   时间:2017-11-29 16:09:05    阅读次数:140
Longest Palindromic Substring
class Solution { public: string longestPalindrome(string s) { int len=s.size(); int left,right; int begin=0,maxlen=0; if(len=0&&rightmaxlen) { ... ...
分类:其他好文   时间:2017-11-25 20:01:42    阅读次数:113
Leetcode 5: Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "b ...
分类:其他好文   时间:2017-11-04 14:54:23    阅读次数:147
5、最长回文子串Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: ...
分类:其他好文   时间:2017-10-27 01:37:34    阅读次数:137
595条   上一页 1 ... 17 18 19 20 21 ... 60 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!