摘要:def longestPalindrome(s: str) -> str:if len(s) = 0 and right < len(
Python
def longestPalindrome(s: str) -> str:if len(s) = 0 and rightC++
#include #include using namespace std;class Solution {public:string expandAroundCenter(const string& s, int left, int right) {while (left >= 0 && right result.size) {result = odd_palindrome;}if (even_palindrome.size > result.size) {result = even_palindrome;}}return result;}};int main {Solution solution;string s;// 获取用户输入cout来源:文化点缀生活
免责声明:本站系转载,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权和其它问题,请在30日内与本站联系,我们将在第一时间删除内容!