Number of distinct subsets of a set | C # program to count number of distinct subsets in an array of distinct numbers ; Returns 2 ^ n ; Driver program
using System ; class GFG { static int subsetCount ( int [ ] arr , int n ) { return 1 << n ; } public static void Main ( ) { int [ ] A = { 1 , 2 , 3 } ; int n = A . Length ; Console . WriteLine ( subsetCount ( A , n ) ) ; } }