# How many substrings of length m can be formed from a string of length n?

Simple counting problem but can't wrap my head around it

ABCD -- Substrings of length 2 : AB, BC, CD. Similarly ABCDE and length 3 -- ABC, BCD, CDE

I see m choose n won't work -- we'll get all subsequences too

-

In general, in a string of length $n$, if you want a substring of length $m$, you can only choose the first $n - m + 1$ characters as starting characters.