Function leetcode_rust::problems::p000_0xx::p000_005::longest_palindrome
source · Expand description
Find longest palindrome of a given string.
It’s possible to have multiple correct answer.
See tests/cases/c000_0xx/c000_005.rs
for more info.
Arguments
s
- original string to search.
Examples
use leetcode_rust::problems::p000_0xx::p000_005::longest_palindrome;
let mut result_value = longest_palindrome(String::from("abbab"));
assert_eq!(result_value, String::from("abba"));