1745. Palindrome Partitioning IV Hard
1/**
2 * [1745] Palindrome Partitioning IV
3 *
4 * Given a string s, return true if it is possible to split the string s into three non-empty palindromic substrings. Otherwise, return false.
5 * A string is said to be palindrome if it the same string when reversed.
6 *
7 * Example 1:
8 *
9 * Input: s = "abcbdd"
10 * Output: true
11 * Explanation: "abcbdd" = "a" + "bcb" + "dd", and all three substrings are palindromes.
12 *
13 * Example 2:
14 *
15 * Input: s = "bcbddxy"
16 * Output: false
17 * Explanation: s cannot be split into 3 palindromes.
18 *
19 *
20 * Constraints:
21 *
22 * 3 <= s.length <= 2000
23 * s consists only of lowercase English letters.
24 *
25 */
26pub struct Solution {}
27
28// problem: https://leetcode.com/problems/palindrome-partitioning-iv/
29// discuss: https://leetcode.com/problems/palindrome-partitioning-iv/discuss/?currentPage=1&orderBy=most_votes&query=
30
31// submission codes start here
32
33impl Solution {
34 pub fn check_partitioning(s: String) -> bool {
35 false
36 }
37}
38
39// submission codes end
40
41#[cfg(test)]
42mod tests {
43 use super::*;
44
45 #[test]
46 fn test_1745() {
47 }
48}
49
Back
© 2025 bowen.ge All Rights Reserved.