Superwormy
Golden Member
Say you're given 5 characters, say they are:
a, d, i, k, z
I need a methodical way to generate every possible unique string using those characters, ie:
adikz
adkzi
akzid
Etc. etc. etc. theres probably lots of them... I can't think of an easy way to do it where I'm not just randomly shuffling an array of letters to come up with combinations... I need to be able to get EVERY combination of letters, it can't be left up to chance.
I need to eventuallyt convert this to PHP and C... but I won't worry about that for now, just looking for a good general method to do this... am I missing something or is this a harder problem than it seems at first?
a, d, i, k, z
I need a methodical way to generate every possible unique string using those characters, ie:
adikz
adkzi
akzid
Etc. etc. etc. theres probably lots of them... I can't think of an easy way to do it where I'm not just randomly shuffling an array of letters to come up with combinations... I need to be able to get EVERY combination of letters, it can't be left up to chance.
I need to eventuallyt convert this to PHP and C... but I won't worry about that for now, just looking for a good general method to do this... am I missing something or is this a harder problem than it seems at first?