question: changing order

Discussion in 'C++' started by VikingHun, Mar 29, 2005.

  1. VikingHun

    VikingHun Guest

    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?
     
    VikingHun, Mar 29, 2005
    #1
    1. Advertising

  2. 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
     
    Ioannis Vranos, Mar 29, 2005
    #2
    1. Advertising

  3. 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
     
    Malte Starostik, Mar 29, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmFtZXM=?=
    Replies:
    3
    Views:
    5,759
    =?Utf-8?B?U2NvdHQgU2ltb25z?=
    Oct 1, 2004
  2. amw
    Replies:
    1
    Views:
    3,034
    Chris Smith
    Sep 25, 2003
  3. Soren Kuula
    Replies:
    2
    Views:
    529
    Soren Kuula
    Feb 1, 2004
  4. cspoh
    Replies:
    0
    Views:
    264
    cspoh
    Jul 31, 2003
  5. Stephan Kämper
    Replies:
    2
    Views:
    249
    Stephan Kämper
    Jan 18, 2004
Loading...

Share This Page