Results 1 to 3 of 3

Thread: Combinations

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2006
    Location
    UK
    Posts
    62

    Combinations

    I have a set of characters and want to find all combinations of these letters numbers e.g. a,b,c. Repeated letters, difference order and any number of characters 1 then 2 then 3



    a
    b
    c

    ab
    ba
    ac
    ca
    bc
    cb

    abc
    acb
    bac
    bca
    cab
    cba

    etc

    Can someone please help me with some code to do this?

    thank you

  2. #2
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    845

    Re: Combinations

    hello,

    Have a look here : https://stackoverflow.com/questions/...ring-down-to-2

    regards
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width