👩💻 Join our community of thousands of amazing developers!
2472. Maximum Number of Non-overlapping Palindrome Substrings Hardness: \(\color{red}\textsf{Hard}\) Ralated Topics: String、Dynamic Programming \(\color{blue}\textsf{weekly Contest 319}\) 一、題目 You are given a string s and a positive integer k. Select a set of non-overlapping substrings from the string s that satisfy the following conditions: The length of each substring is at least k. Each substring is a palindrome. Return the maximum number of substrings in an optimal selection. A substring is ...