I need the classic N choose K algorithm to generate all the possible combinations of a list or iterable in Dart. Is there any implementation out there?
Asked
Active
Viewed 1,576 times
5
-
Something like https://pub.dartlang.org/packages/trotter? – Günter Zöchbauer Mar 31 '15 at 19:03
-
Sounds perfect! Why don't you post the answer? – Cristian Garcia Apr 06 '15 at 15:26
1 Answers
7
The package trotter seems to do what you are looking for.
Günter Zöchbauer
- 558,509
- 191
- 1,911
- 1,506
-
2even through it looks cool, it doesn't have null safety as for Sept 1 2021 – goodniceweb Sep 01 '21 at 06:39
-
-
1@goodniceweb checkout this solution https://stackoverflow.com/a/64302098/12695188 – genericUser Mar 18 '22 at 11:30