Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
using System;
using System.Collections.Generic;
using System.Linq;
namespace PowerSet
{
class Program
{
static void Main(string[] args)
{
string given = "CAT";
char[] givenAsCharArr = given.ToCharArray();
getSubsets(givenAsCharArr, givenAsCharArr.Length, 0, new List<string>());
Console.ReadKey();
}
static void getSubsets(char[] arr, int size, int index, List<string>subset)
{
if (index == size)
{
Console.WriteLine(string.Join(",", subset));
return;
}
getSubsets(arr, size, index + 1, subset);
subset = (subset.Take(subset.Count)).ToList();
subset.Add(arr[index].ToString());
getSubsets(arr, size, index + 1, subset);
}
}
}