Home > Computer Programming, Computer Science > Generating Subsets !

Generating Subsets !

Hello !

Finding subsets of a set is one of the most difficult deterministic time problem. Specially finding an iterative solution for this problem is even more hard. Fortunately I once worked on combinatoric problems and solved this problem. I wrote the following C++ code to print the subsets of single element set in form of a string. (I will explain the algorithm some other time as I am running short of time…)

main()
{
char **subsetString, setString[100]="", temp[100] = "", tempString[100] = "";
int diff = 0 , subsetRows = 0, subsetColumns = 0;
cout

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: