Practice Number of Strings Which Can Be Rearranged to Contain Substring
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Number of Strings Which Can Be Rearranged to Contain Substring
Problem Statement
You are given an integer n. A string s is called good if it contains only lowercase English characters and it is possible to rearrange the characters of s such that the new string contains "leet" as a substring. For example: Return the total number of good strings of length n. Since the answer may be large, return it modulo 10^9 + 7. A substring is a contiguous sequence of characters within a string.
Source: Number of Strings Which Can Be Rearranged to Contain Substring on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
n = 4
12
# Example 2
n = 10
83943898
Constraints
Related LeetCode Problems
Practice more problems similar to Number of Strings Which Can Be Rearranged to Contain Substring.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.