Skip to main content
NatNgs's user avatar
NatNgs's user avatar
NatNgs's user avatar
NatNgs
  • Member for 8 years, 5 months
  • Last seen more than 4 years ago
awarded
awarded
awarded
comment
Generate a set of combinations
Uh ! Thank you for the reference, I'm looking at it (slightly difficult haha)
comment
Generate a set of combinations
There is a problem with the function you propose: For example if we call combinationGroup([0,1,2,3],2,2) we will have: [ [0,1],[2,3] ] as only output; but result should have also [ [0,2],[1,3] ] and [ [0,3],[1,2] ]. Maybe look at another question relative to the number of result I should have with this algorithm on MathOverflow - Concerning your combinations method, it works well, but look much more complicated than mine genCombinations1
comment
Generate a set of combinations
Yeah exactly, generating each possible set of outSize subsets; each subset of size elemsSize.
awarded
awarded
comment
Generate a set of combinations
Ok, so I will reset the message as I posted originally; I thought it was too complex and could be reduced to the needs of this question. Please check :) ! Here you will see at the end of the snippet code an example of execution.
revised
Generate a set of combinations
rolled back to a previous revision
Loading…
comment
Generate a set of combinations
Ok so let's check my actual code so ! I don't really now what you want to see inside it but ok.. My problem is still to rewrite the genCombinations2 function to not being recursive anymore (like genCombinations1 that is not recursive)
revised
Generate a set of combinations
Put my actual code
Loading…
comment
Generate a set of combinations
I rewritten the problem to a simplified version of my code. Reviewing this example without the recursion will be useful for me.
revised
Generate a set of combinations
Changed example problem to a simpler one
Loading…
revised
Loading…
revised
Loading…
asked
Loading…
awarded
comment
Finding unreferenced documents
Wow !! Very interesting ! It was somethng like this distinct operator I wanted to find. 1: Yes there is an index on vid, so this will work; 2: Took 4s for me (just one try), perfect; Thank you @felix
awarded