Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > question: changing order

Reply
Thread Tools

question: changing order

 
 
VikingHun
Guest
Posts: n/a
 
      03-29-2005
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?
 
Reply With Quote
 
 
 
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-29-2005
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:rev_permutation.



--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
 
 
 
Malte Starostik
Guest
Posts: n/a
 
      03-29-2005
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:rev_permutation?

Cheers,
Malte
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If you get an order # does it mean the order is accepted? =?Utf-8?B?U3RldmUxMDc3?= Windows 64bit 3 05-12-2005 11:46 PM
Changing order Thunderbird checks email fety Firefox 1 04-10-2005 10:33 AM
Traversion order cf. output order in XSL Soren Kuula XML 2 02-01-2004 09:10 AM
In which order are files looked for when loaded/requierd - and what'sthe order of suffixes? Stephan Kämper Ruby 2 01-18-2004 02:07 PM
How to Display DropDownList with preserved order (custom order) cspoh ASP .Net Web Controls 0 07-31-2003 09:19 AM



Advertisments