Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Notice that any string of the same length as s will always have the same answer, so only the length of the string matters.
For each substring of size k, you can decide whether to flip or not. Every string s resulting from this process will be unique.
How do you find the number of possible combinations?