Hello,

i'm searching for a algorithm for the following problem. I want to combine every number in a list with each one of the List except for itself and none of the numbers should be repeat more than two times in a row. The list can be randomly long.
For example
1,2,3,4

The result should be:
1-2
2-3
3-4
1-4
1-3
4-2

Can you help me? Thanks in advance!

Regards
Bluescreen