FYI, I don't have much programming experience but I can usually find a way to do what I want to do. I'm going to need a bit of help this time though.

Pretend we have a cartesian graph with a bunch of random points represented by the int 1 thru int N. I want to find an algorithm for arranging all of these N points in every possible order where each point is mentioned once and only once. Please make sure you don't just give me an explanation for the permutations when N is less than 10. This needs to work (theoretically) when N is very large.

For example, if N is 5, this might be a sample of the result:

1 2 3 4 5 (first arrangement)

1 2 3 5 4

1 2 4 3 5

1 2 4 5 3

1 2 5 3 4

1 2 5 4 3

...

1 5 4 3 2

2 1 3 4 5

...

5 4 3 2 1 (last arrangement)

In case you were wondering, I'm working on a program to solve traveling salesman problems by brute force. I came up with an original algorithm and I'd like to test its efficiency against the brute force model. Thanks for your help!