Ruby

Still learning, so don't expect anything big yet.

Variation

Same thing as the C++ version but with Ruby.

Enter a sequence: 123
---------------------
123
132
213
231
312
321
---------------------
Found 6 combinations of "123"

» Source