combinatoricslib3 icon indicating copy to clipboard operation
combinatoricslib3 copied to clipboard

Best way to determine "the rest of the sequence" generated with the `subset()` method?

Open axkr opened this issue 5 years ago • 0 comments

What is the best way to determine "the rest of the sequence" generated with the subset() method? For example to get exactly 3 partitions out of 5 elements and filling the second partition again with a "subset of the rest" and filling last partition with the subset of elements not used in the first 2 partitions?

How to improve this snippet?

Generator.subset(1, 1, 2, 2, 3)
        .simple()
        .stream()
        .forEach(System.out::println);

axkr avatar Aug 11 '20 17:08 axkr