C
chiara
Hi everybody!
I am just at the beginning as a programmer, so maybe this is a stupid
question...Anyway,I need to write a function in C to generate generate
all possible strings of given length given a set of characters
(allowing repetitions of the same character)
For example given the characters 'E' and 'H' and maximum length 3 the
function should generate the sequences
H
E
HH
EE
HE
EH
HHH
EEE
HEE
EHE
EEH
HHE
HEH
EHH
Anybody can help?
I am just at the beginning as a programmer, so maybe this is a stupid
question...Anyway,I need to write a function in C to generate generate
all possible strings of given length given a set of characters
(allowing repetitions of the same character)
For example given the characters 'E' and 'H' and maximum length 3 the
function should generate the sequences
H
E
HH
EE
HE
EH
HHH
EEE
HEE
EHE
EEH
HHE
HEH
EHH
Anybody can help?