Reputation: 311
Is there any direct formula to count the number of subsequences possible from an array of size n It is not needed to be contiguous and also not needed to be only distinct subsequences
Upvotes: 2
Views: 2750
Reputation: 80187
Yes, there is formula for number of combinations
nCr(n, k) or C(n,k) = n! / ((n-k)! * k!)
Upvotes: 1