Hello,
I'm going to complete my apprenticeship as coder and i got a nice j2me project to work on. But i have to admit that i'm not that good with mathematical algorithms as i'd like to be.
My problem is to create all possible "domino pairs" from a given set of values. For example: The possible values go from 0 to 6. Now imagine some domino tokens with those values. The output should then be something like this:
00
01
02
03
04
05
06
11
12
13
...
Each pair only appears a single time but pairs with two equal values are possible.
I've already searched for this problem, but either i didn't find a solution for this particular problem or i didn't really understand how the algorithms work.
I'd really appreciate any explanations and algorithms. Feel free to post alternative solutions as well. I'd prefer to not just have a solution, but to understand it as well ;)
Best wishes,
-- ceefar
P.S: Sorry, if some expressions may sound a bit awkward - english isn't my native language ;)