wood burning stoves*
The moose likes Beginning Java and the fly likes algorithm (k letters combination in a word) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "algorithm (k letters combination in a word)" Watch "algorithm (k letters combination in a word)" New topic
Author

algorithm (k letters combination in a word)

sk said
Greenhorn

Joined: Mar 30, 2011
Posts: 5
hi guys,

i need help on algorithm to combine k letters from a word.
for example, i have this word: 'ABCD' . then i want to combine 3 letters from that word. so it comes to these combination:
1- ABC
2- ABD
3- ACD
4- BCD

how is the algorithm in java script so that i can get any letter combination from any word insert by users?
real need it urgent....please and thanks in advance
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
sk said wrote:how is the algorithm in java script so that i can get any letter combination from any word insert by users?
real need it urgent....please and thanks in advance

Please CarefullyChooseOneForum and be patient
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8008
    
  22

sk said wrote:i need help on algorithm to combine k letters from a word.
for example, i have this word: 'ABCD' . then i want to combine 3 letters from that word. so it comes to these combination:

We need a bit more information than that. What do you want it to do if the word is 'ABBB' or 'ABAB' or 'ABCA'?

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1666
    
    7

how is the algorithm in java script


Also you posted this question in a Java forum. Java and java script are not the same.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: algorithm (k letters combination in a word)