Surprised => indulgence => Calm => Lost => Panic =>Calm

算法-每天一道题(27)-409. Longest Palindrome-map使用

算法 admin 1144℃ 0评论

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 considered a palindrome here.

Note:

Assume the length of given string will not exceed 1,010.

Example:

Input:

“abccccdd”

Output:

7

Explanation:

One longest palindrome that can be built is “dccaccd”, whose length is 7.

Go语言

转载请注明:Imekaku-Blog » 算法-每天一道题(27)-409. Longest Palindrome-map使用

喜欢 (0)or分享 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址