algorithm: odometer / beast force
i wish odometer-like slight c#-style-language, nonetheless only controlling 0-9 characters, nonetheless any set characters. act brute-force application, some-more less.
if i pass char-array characters 0 j, set length 5, i wish law 00000, 00001, 00002... hjjjj, ijjjjj, jjjjj.
here base, greatfully assistance me expand:
protected vacant main()
{
char[] chars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
bruteforce(chars, 5);
}
private vacant bruteforce(char[] chars, int length)
{
// for-loop (?) console-writing illusory combinations 00000 jjjjj
// (when upheld length 5)
// todo: exercise code...
}
Comments
Post a Comment