Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[OTHER] Code Duplication:SimpleSort andExchangeSort are identical #6358

Open
Labels
awaiting triageAwaiting triage from a maintainer
@codingmydna

Description

@codingmydna

What would you like to share?

Summary

The sorting algorithms inSimpleSort.java andExchangeSort.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 forSimpleSort andExchangeSort 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:

  1. Remove one of the classes.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting triageAwaiting triage from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp