Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

scamble --> help me to solve it

 
Manisekar Chinnasami
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi friends,

here is the problem ...

i need to get all the combinations of a word ...

in detail ... if the input string is "man", then the output should be ...
(all itz combinations)
man
mna
amn
anm
nma
nam

three is little bit easy , but i need it for word with minimum five letters ....
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Report post to moderator
how did you calculate the combinations of MAN, cant you just use the same method/algorithmn for 5 plus?

[ August 07, 2007: Message edited by: Gavin Tranter ]
[ August 07, 2007: Message edited by: Gavin Tranter ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate, please continue here.
 
grapes are vegan food pellets. Eat this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!