算法描述: Given an array of strings, group anagrams together. Example: Note: All inputs will be in lowercase. The order of your output does not matter. 解题 ...
分类:
其他好文 时间:
2019-01-29 20:47:18
阅读次数:
200
5. Longest Palindromic Substring 1)题目 2)思路 遍历s, 判断每一位为中间位的最大回文子串。 比较即可。 3) 代码 4) 结果 时间复杂度:O(n^2) 空间复杂度:O(n) 耗时: 5) 调优 ...
分类:
其他好文 时间:
2019-01-28 00:56:12
阅读次数:
144
题目: 题目: 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 palindromi ...
分类:
其他好文 时间:
2019-01-27 16:33:20
阅读次数:
132
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Example 2: 还是用DP来递归,抓住回 ...
分类:
其他好文 时间:
2019-01-26 21:38:37
阅读次数:
150
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: ...
分类:
其他好文 时间:
2019-01-25 11:34:43
阅读次数:
173
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Example 2: 1 class Solu ...
分类:
其他好文 时间:
2019-01-20 15:07:08
阅读次数:
164
字符串遍历,从中间分出奇数回文和偶数回文两种情况不断更新长度。我一开陷入入误区把字符串分为奇偶结果偶数的可以过,基数的abb过不了。所以就是分析回文就好 ...
分类:
其他好文 时间:
2019-01-05 21:39:40
阅读次数:
193
General Palindromic Number A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234 ...
分类:
其他好文 时间:
2019-01-01 21:13:13
阅读次数:
235
Difficulty: Medium More:【目录】LeetCode Java实现 Description Given a string s, find the longest palindromic substring in s. You may assume that the maximum ...
分类:
其他好文 时间:
2018-12-10 21:58:32
阅读次数:
173
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 ...
分类:
其他好文 时间:
2018-11-24 19:52:52
阅读次数:
156