Given a string s and a positive integer k, select the maximum number of non overlapping substrings such that each selected substring is a palindrome with a length of at least k.
Return the maximum number of such substrings that can be chosen.
Note: A substring is a contiguous sequence of characters within a string. A palindrome is a string that reads the same backward as forward. Substrings are non overlapping if they do not share any common indices.
Constraints:
k s.length
s consists of lowercase English letters.
Given a string s and a positive integer k, select the maximum number of non overlapping substrings such that each selected substring is a palindrome with a length of at least k.
Return the maximum number of such substrings that can be chosen.
Note: A substring is a contiguous sequence of characters within a string. A palindrome is a string that reads the same backward as forward. Substrings are non overlapping if they do not share any common indices.
Constraints:
k s.length
s consists of lowercase English letters.