hmm,
Kyle, I guess being new to the whole backtracking thing, i'm not sure where you actually would say, "this is the backtracking step" in your solution (though it works):
public static void printSubset(int[] arr, int val, int i)
{
while (arr[i] <= val)
{
int k;
for (k = 0; k <= i; k++) print(arr[k].ToString());
print("\n");
if (arr[i] < val)
{
arr[i + 1] = arr[i] + 1;
printSubset(arr, val, i + 1);
}
arr[i]++;
--
Irwin Williams
785-1268
________________________
*I am a software solutions developer.*
Do you see a man skilled in his work?
He will serve before kings; he will not
serve before obscure men.
Proverbs 22:29