I have a problem for a university lab;
Write a short program that outputs all possible strings formed by using characters ‘c’, ‘a’, ‘r’, ‘b’, ‘o’, and ‘n’ exactly once.
It seems to be a common interview question and well documented.
So I've coded it with Java using a recursive method which wasn't too hard, when or why would you choose not to use recursion and what would be the easiest way of doing it?
I started to code a counter that would count down on base 6, the output would then reference char's and print the string.
Thanks,