原文:[LeetCode] Longest Palindrome 最长回文串

Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This is case sensitive, for example Aa is not conside ...

2016-10-05 10:45 2 11586 推荐指数:

查看详情

最长回文子串 - leetcode 5. Longest Palindromic Substring

写在前面:忍不住吐槽几句今天上海的天气,次奥,鞋子里都能养鱼了...裤子也全湿了,衣服也全湿了,关键是这天气还打空调,只能瑟瑟发抖祈祷不要感冒了.... 前后切了一百零几道leetcode的题(solution同步在github),主要是拣难度系数定为easy的水题做...好吧,这是第一道算法题 ...

Mon Aug 24 17:44:00 CST 2015 0 2392
Leetcode】【Longest Palindromic Substring】【最长回文子串】【C++】

题目:给定字符,求其最长回文子串 说明:给定字符长度为1000以内。 思路:for循环遍历字符,求以i为中心的回文子串长度。与最长回文子串长度max_len比较,若大于max_len,则更新max_len。 说明:注意分开处理子串长度为奇偶的两种情况 时间复杂度:O ...

Sat Jun 09 23:23:00 CST 2018 0 1303
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM