I have to calculate number of sliding window in a string.
If the sample string is "CHECKIT" and window size is 2 then
- CH
- HE
- EC
- CK
- KI
- IT
Window size may vary for the string.
I have to calculate number of sliding window in a string.
If the sample string is "CHECKIT" and window size is 2 then
Window size may vary for the string.
For a word with $n$ alphabets, for eg. ALPHABETS has 9 alphabets. Of this, window size is $k$. Total possible ways will be:
$$P = n - k + 1 = 9 - k + 1 = 10 - k$$
and so on...