What’s time complexity of this algorithm for finding all combinations?

The complexity is O(C(n,k)) which is O(n choose k).

This ends up being equivalent to O(min(n^k, n^(n-k))).

Leave a Comment