Does anyone know of any examples for Johnson-Trotter algorithm using C++?

I'm reading through generating permutations and I'm having a hard time reading the psuedocode.  I think I would understand it better if I saw the C++ code.  Also, maybe some links that show how it works without using code.

I plan on using the clock function to compare bottom up; Johnson-Trotter and lexicographic order.
LVL 1
warriorfan808Asked:
Who is Participating?
 
Dariusz DziaraConnect With a Mentor ProgrammerCommented:
Maybe you will find the following useful:

http://www.theory.csc.uvic.ca/~cos/inf/perm/PermInfo.html

look at the bottom of the page and click "C program"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.