Linked Questions
36 questions linked to/from Generate list of all possible permutations of a string
4
votes
3answers
3k views
Creating A List of Possible String Combination [duplicate]
Possible Duplicate:
Generate list of all possible permutations of a string
I need to work on a small algorithm project where I need to be able to list and write to a text file the possible ...
2
votes
1answer
627 views
Calculate all possible letter combinations [duplicate]
I'm trying to make a JavaScript that calculate all possible letter combinations.
I've made this so far:
var input = window.prompt("What to calculate?", "");
var letters = input;
var ...
434
votes
56answers
600k views
Generating all permutations of a given string
What is an elegant way to find all the permutations of a string. E.g. permutation for ba, would be ba and ab, but what about longer string such as abcdefgh? Is there any Java implementation example?
20
votes
12answers
10k views
Algorithm to get all possible string combinations from array up to certain length
What is the best algorithm to get all possible string combinations from a given array with a minimum & maximum length value.
Note: This adds complexity since the value is variable unlike the ...
26
votes
4answers
14k views
All possible permutations of a given String?
How would I do this in Ruby?
p "abc".all_possible_permutations
Would return:
[
"abc",
"acb",
"bca",
"bac",
"cba",
"cab",
]
Edit
Thanks to Jakub Hampl:
class String
def ...
11
votes
4answers
20k views
How to get all the possible 3 letter permutations? [duplicate]
Possible Duplicate:
Listing all permutations of a string/integer
For example,
aaa .. aaz .. aba .. abz .. aca .. acz .. azz .. baa .. baz .. bba .. bbz .. zzz
Basically, imagine counting binary but ...
14
votes
7answers
6k views
Calculating permutations in F#
Inspired by this question and answer, how do I create a generic permutations algorithm in F#? Google doesn't give any useful answers to this.
EDIT: I provide my best answer below, but I suspect that ...
3
votes
4answers
13k views
Get every combination of strings
I had a combinatorics assignment that involved getting every word with length less than or equal to 6 from a specific combination of strings.
In this case, it was S = { 'a', 'ab', 'ba' }. The ...
3
votes
7answers
16k views
brute forcer algorithm with all possible combinations / permutation in a given char array
Need help for this simple thing that is annoying me.
I have seen many similar algorithms but I want to do this in exactly the stated way to reach ALL possible combinations / permutation in a given ...
3
votes
3answers
14k views
Generate all combinations of 10 digits without any repetition [duplicate]
I am having an assignment about creating password through Java:
Suppose you work in a safe selling company and your manager asked you to create a list of all the ten digit numbers between ...
3
votes
4answers
6k views
All possible combinations of a string with no repetitions in Java
I know that this question has been answered before on stackoverflow, however I am asking this not to tell me the correct code, but because I want to know what I am doing wrong.
public static void ...
-5
votes
1answer
3k views
permutations and combinations [closed]
I have a program which creates some combinations of strings like if I entered input abc it gives me output as bca cab abc
#include<stdio.h>
#include<string.h>
int main()
{
char str[15]...
5
votes
3answers
1k views
Parallel algorithm to produce all possible sequences of a set
I'm having difficult time while trying to produce all possible strings of a given character set. Let S be set of symbols. I need to process all possible combinations of S in length n. For example if S=...
0
votes
1answer
4k views
Math twenty four game Java [duplicate]
The 24 Game is an arithmetical game in which the objective is to find a way to manipulate four integers so that the end result is 24. Addition, subtraction, multiplication, or division in any order of ...
4
votes
4answers
199 views
Replacing chars in a string in every way
I'm looking for help on a function that takes a string, and replaces every character in that string in every way. I'm not quite sure how to word my question so that it makes sense so I'll show you ...