permutation
Permutations, Recursion
I have an assignment: User enters a String, example ABCD and the program has to give out alll the permutations.[详细]
2023-02-20 01:55 分类:问答different length permutations [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Algorithm to return all combinations of k elements from n[详细]
2023-02-18 06:13 分类:问答How to turn the result (in python) of itertools.permutations("0123456789") into list of strings
In Python, I am using list(itertools.permutations(\"0123456789\")), and I am receiving (I as expected) a list of tuples of singled character strings.[详细]
2023-02-17 17:25 分类:问答How to rewrite a recursive function to use a loop instead?
This stack overflow thread claims that every recursive function can be written as a loop. Which recursive functions cannot be rewritten using loops?[详细]
2023-02-17 11:19 分类:问答how to get all combinations from multiple trees?
I have no idea how to get all the possibilities from x sets of data other than using x nested for loops, which i dont want to do, because i dont know the value of x, which makes it very possible for t[详细]
2023-02-17 03:06 分类:问答Stuck with Combination Problem
I\'m having a problem w/ my program. I have extracted a set of data and I would like to test if there is a combination for a particular number. For example, I have an array of int, 1 2 3 4 5, I would[详细]
2023-02-17 01:53 分类:问答Generating circular shifts / reduced Latin Squares in Python
Was just wondering what\'s the most efficient way of generating all the circular shifts of a list in Python. In either direction. For example, given a list [1, 2, 3, 4], I want to generate either:[详细]
2023-02-16 19:18 分类:问答permutation/generate combination prefix and suffix
I have an array of prefixes, an array of base words and an array of suffixes. I would like to see every combination that can be made.[详细]
2023-02-15 07:58 分类:问答Find the index of a given permutation in the sorted list of the permutations of a given string
We\'re given a string and a permutation of the string. For example, an input string sandeep and a permutation p开发者_运维问答sdenae.[详细]
2023-02-13 21:50 分类:问答C# String permutation
I have 5 strings, such as: \"one\", \"two\", \"three\", \"four\", and \"five\". I need to get all permutations of these strings. I\'ve explored all internet resources, but all solutions are so bulky a[详细]
2023-02-13 10:00 分类:问答