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

Posted on 2006-06-05
Medium Priority
Last Modified: 2011-10-03
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.
Question by:warriorfan808
1 Comment

Accepted Solution

mrblue earned 2000 total points
ID: 16831789
Maybe you will find the following useful:


look at the bottom of the page and click "C program"

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question