String database[] = {\'a\', \'b\', \'c\'};
I would like to generate the following strings sequence, based on given database
.
This smells like counting in binary:
My first instinct would be to use a binary counter as a "bitmap" of characters to generate those the possible values. However, there are several wonderful answer to related questions here that suggest using recursion. See