TheAlgorithms / Java

All Algorithms implemented in Java
MIT License
60.1k stars 19.4k forks source link

[OTHER] updating sort algorithm parameters to Generic type <T> #3767

Closed Tabbygray closed 1 year ago

Tabbygray commented 1 year ago

What would you like to share?

in [sorts] package, algorithms offer .sort() function. most of them has input parameter as generic type Comparable, but some of them supports int[ ] only.

※algorithms that sort int[ ] only = [BinaryInsertionSort, BucketSort, DNFSort, OddEvenSort, PigeonHoleSort, RadixSort] exception : beadsort (algorithm cannot sort negative int / String sort)

how do you think about updating algorithm's parameter type to Generic type ?

Additional information

No response

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

siriak commented 1 year ago

I think we should do that because comparability is everything they need to work

Regyl commented 1 year ago

@siriak I'd like to do that, could you assign to me?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!