Open
Description
What would you like to share?
Summary
The sorting algorithms in SimpleSort.java
and ExchangeSort.java
appear to be functionally identical, representing code duplication that could be refactored.
Description
While analyzing the sorting algorithms in the repository, I noticed that the implementation for SimpleSort
and ExchangeSort
is the same.
File links
Both files implement the same O(n^2) sorting logic using a nested loop structure:
To resolve this, I suggest one of the following actions:
- Remove one of the classes.
- If both names are to be kept for discoverability, add comments to both files clarifying that they are aliases for the same underlying algorithm.
Additional information
I might be missing some context, so please feel free to correct me if this duplication is intentional for a specific reason.