By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,148 Members | 1,379 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,148 IT Pros & Developers. It's quick & easy.

question: changing order

P: n/a
Hi all;)

I recently thought about making a program that would output all
possible
orders that groups of numbers, characters etc. of different sizes
could have.(eg. 1,2,3 1,3,2 2,1,3 2,3,1 3,1,2 3,2,1) I racked my
brain, but couldn't find a solution. Can anyone help me?
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
VikingHun wrote:
Hi all;)

I recently thought about making a program that would output all
possible
orders that groups of numbers, characters etc. of different sizes
could have.(eg. 1,2,3 1,3,2 2,1,3 2,3,1 3,1,2 3,2,1) I racked my
brain, but couldn't find a solution. Can anyone help me?

Check std::next_permutation, std::prev_permutation.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #2

P: n/a
VikingHun schrieb:
Hi all;)

I recently thought about making a program that would output all
possible
orders that groups of numbers, characters etc. of different sizes
could have.(eg. 1,2,3 1,3,2 2,1,3 2,3,1 3,1,2 3,2,1) I racked my
brain, but couldn't find a solution. Can anyone help me?


Have you tried std::next_permutation or std::prev_permutation?

Cheers,
Malte
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.