Find all possible subsets of n elements (special powerset) . Ordering within a subset is not ignored.

69 Views Asked by At

I am unable to find the total number of possible subsets taking ordering into account.

For example:- take $2$ elements $1$ & $2$, then form subsets $(),(1),(2),(1,2),(2,1)$

Now here $(1,2)$ & $(2,1)$ are two different ordered sets and both should be counted.

Please help me find the total number of subsets for $n$ elements.

I have to program the above logic, so a formula derivation would help a lot.