java-merge-sort icon indicating copy to clipboard operation
java-merge-sort copied to clipboard

Sort/Merge process that removes duplicates

Open tjoneslo opened this issue 12 years ago • 4 comments

I would like a way to enhance the sort or merge process that allows removing duplicate values from the input.

For example, if my input is: a, b, c, b, a the output would be a, b, c

Currently the Merger constructor is too deep in the Sorter code to easily override the creation process and make my own Merger subclass.

tjoneslo avatar Sep 03 '13 18:09 tjoneslo

Sounds like a good idea yes.

cowtowncoder avatar Sep 03 '13 19:09 cowtowncoder

Not implemented yet, but hoping to do this after 1.0 release.

cowtowncoder avatar Jun 04 '14 15:06 cowtowncoder

I probably need something similar to that soon. It would be great if the suppliable Comparator would be more generic and allow for merging/updating/removing the passed-in objects.

jjYBdx4IL avatar Oct 22 '17 07:10 jjYBdx4IL

@jjYBdx4IL That wouldn't quite work via basic Comparor API would it? Nothing against possibly extending Comparator, taking sub-class. Or perhaps just creating a different interface for API.

cowtowncoder avatar Oct 23 '17 22:10 cowtowncoder