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.
Who is Participating?
Dariusz DziaraConnect With a Mentor ProgrammerCommented:
Maybe you will find the following useful:

look at the bottom of the page and click "C program"
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.