Top "Combinations" questions

A combination is a selection of objects from a larger collection in no particular order.

How to generate all combination from values in dict of lists in Python

I would like to generate all combinations of values which are in lists indexed in a dict: {'A':['D','E'],…

python dictionary combinations
Generating Combinations in python

I am not sure how to go about this in Python, if its even possible. What I need to do …

python arrays multidimensional-array combinations matrix
Python - get all combinations of a list

I know that I can use itertools.permutation to get all permutation of size r. But, for itertools.permutation([1,2,3,4],3) it …

python list combinations permutation itertools
Combination Generator in Linq

Is it possible to create some Linq that generates a List containing all possible combinations of a series of numbers?? …

c# linq combinations
How can I create cartesian product of vector of vectors?

I've a vector of vectors say vector<vector<int> > items of different sizes like as follows 1,2,3 4,5 6,7,8 …

c++ vector combinations cartesian-product
Algorithm to select a single, random combination of values?

Say I have y distinct values and I want to select x of them at random. What's an efficient algorithm …

algorithm combinations
Solving Puzzle in Python

I got one puzzle and I want to solve it using Python. Puzzle: A merchant has a 40 kg weight which …

python permutation combinations puzzle itertools
In Perl, how can I generate all possible combinations of a list?

I have a file with a list, and a need to make a file that compares each line to the …

arrays perl combinations combinatorics
How to get all combinations of length n in python

I was wondering if there is any way of getting all combinations of length n from a list of numbers. …

python combinations
Combine multiple enums into master enum list

Is it possible to combine multiple enums together? Below is code sample of what I would like to see: enum …

c# enums combinations