java力扣LeetCode 5. 最长回文子串

5. 最长回文子串
java力扣LeetCode 给你一个字符串 s,找到 s 中最长的回文子串。
方法一 暴力求解
class Solution {
public String longestPalindrome(String s) {
String res = null ;
int m=0;
int flag=0;

for(int i = 0;ii;j--)
{
if(s.charAt(i)==s.charAt(j))
{
int a=i;
int b=j;
int k;
int temp=0;
flag=0;
for( k =a; k<=b;k++) { Syst

java力扣LeetCode 5. 最长回文子串最先出现在Python成神之路

版权声明:
作者:Zad
链接:https://www.techfm.club/p/9828.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>