Linked Questions
107 questions linked to/from Generating all permutations of a given string
10 votes
2 answers
35k views
Generate all permutations in Java [duplicate]
Possible Duplicate: Generating all permutations of a given string I have an array of arbitrary length in Java, and I would like to generate all possible permutations of them. The easy way to do ...
3 votes
3 answers
9k views
Given a length and a set of characters, how to get all the possible string combinations [duplicate]
Possible Duplicate: Generating all permutations of a given string Given a length n=4, and a set of characters -> {'a', 'b'}, how to write some java codes to produce all the possible string ...
0 votes
2 answers
3k views
Java permutations of an array [duplicate]
I have an array : String wordArr[]=new String[3]; [1 2 3] I want to form arrays with all combinations of the above. Say., 123 132 213 231 321 312 Can anyone give me an idea on how to find the ...
0 votes
2 answers
3k views
All possible permutations of words in a sentence [duplicate]
I have a sentence, I love java coding I need to write a function that returns an array list of all possible permutations of words in the sentence, viz I java love coding I coding love java ............
1 vote
3 answers
3k views
how to print lexicographic permutations of 0,1,2 in java [duplicate]
How to print lexicographic permutations of giving integer values. Example if i give 012 then output should be 012 021 102 120 201 210. What i tried for achieve this, package TEstingHere; public ...
0 votes
2 answers
2k views
Java: Unknown number of 'for' loops [duplicate]
I want to make a program that would un-jumble some words. I need to try all possible combinations of the words that can be formed, and then check if it is contained in a String variable, named dict. ...
-2 votes
2 answers
1k views
Get all combinations of a certain number [duplicate]
this might be a stupid question with a simple answer but I can't for my life figure it out.. :p So if I have a variable n = 2 for example I want a list of all ways you can combinate the numbers that'...
0 votes
1 answer
771 views
Generate all permutation of a string in recursion in java [duplicate]
I would like to know how to create all permutation of a given string in a recursive way. Lets say that String a = "abcdefghijklmnopqrstxyz";. I would like to generate a string of length 5 (for ...
1 vote
2 answers
383 views
Alogrithm to getting all combines of x-letters [duplicate]
Possible Duplicate: Generating all permutations of a given string I´m looking for a algorithm which returns me a List of all possible combines of x-letters. Example: 3 letters. (A,B,C) A B C A C ...
0 votes
1 answer
244 views
PHP: Alphabetical permutation [duplicate]
I have difficult homework: The list contains alphabetically all strings, which can form the letters A-K. The start of the list looks like this: ABCDEFGHIJK, ABCDEFGHIKJ, ABCDEFGHJIK, ABCDEFGHJKI, ... ...
0 votes
1 answer
285 views
Generating all purmutations of a Java string, including smaller words, and excluding duplicates [duplicate]
I am trying to write a code in Java that would allow me to take a random String like "cat" and generate all the possible letter combinations, including shorter strings. The answers offered on the ...
0 votes
0 answers
126 views
All permutations of a string [duplicate]
I have the following code which uses recursion to create a list of all permutations of an input string. I'm struggling to understand how it works. The idea of the algorithm is that the first char is ...
0 votes
1 answer
79 views
Java: Another way of generating permutations? [duplicate]
I have the following code that will generate the permutations of an entered string, but is it possible for it to be changed so that there is no use of the for loop, just recursion? public static void ...
0 votes
0 answers
74 views
How to random order a 3 digit number on a list box? [duplicate]
How to random order a 3 digit number on a list box? For example, When I add any 3 digit number on a list box to this number 647 = $23 The result is: 647 = $23 674 = $23 476 = $23 467 = $23 746 =...
0 votes
0 answers
53 views
Java - How to get all possible combinations of the letters in a string? [duplicate]
Is there a way to get all possible combinations of the letters of a given string? I don't want to ignore doubled letters. Also I want to get all possibilitys, even if not every letter is used. For ...