procedure to output all the n! combinations of the set s {1...n}

    Date: 01/25/06 (Algorithms)    Keywords: no keywords

    I am trying to write a procedure to output all the n! combinations of the set s {1...n}

    for example

    n = 3 , s = 1 2 3 then I want to print out
    1 2 3
    1 3 2
    2 1 3
    2 3 1
    3 1 2
    3 2 1

    I am still trying to do it but if you know right away an algorightm for doing this please let me know .. thanks

    Source: http://community.livejournal.com/algorithms/71766.html

« Adaptive Golomb coding || Solutions »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home