I need to find the count of all possible combinations of length $K$ for a given string $N$. The characters cannot repeat.
For example, if the given string is $$a,b,c,d,\quad N=4$$
The possible number of combinations of length $K=2$ will be $12$: $$ ab,ac,ad,bc,bd,cd,ba,ca,cb,da,dc,db $$
The possible number of combinations of length $K=3$ will be $24$: $$ abc,abd,acb,acd,adb,adc,bac,bad,bcd,bca,bda,bdc,cab,cad,cba,cbd,cda,cdb,dab,dac,dba,dbc,dca,dcb $$
Is the formula $\dfrac{N!}{(N-K)!}$ correct?