← 返回首页
Handle empty array input in selection sort by MayankSharma-2812 · Pull Request #1875 · TheAlgorithms/JavaScript · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Handle empty array input in selection sort#1875

Open
MayankSharma-2812 wants to merge 4 commits into
TheAlgorithms:masterfrom
MayankSharma-2812:handle-empty-array-in-selection-sort
Open

Handle empty array input in selection sort#1875
MayankSharma-2812 wants to merge 4 commits into
TheAlgorithms:masterfrom
MayankSharma-2812:handle-empty-array-in-selection-sort

Conversation

Copy link
Copy Markdown

Adds an early return to handle empty array inputs gracefully without affecting existing selection sort logic.

Copy link
Copy Markdown

codecov-commenter commented Jan 25, 2026
edited
Loading

Codecov Report

❌ Patch coverage is 85.36585% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.89%. Comparing base (08d8c6b) to head (b135a51).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
Search/BinarySearch.js 66.66% 4 Missing ⚠️
Sorts/SelectionSort.js 71.42% 2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## master #1875 +/- ## ========================================== - Coverage 85.91% 85.89% -0.03% ========================================== Files 379 379 Lines 19778 19783 +5 Branches 3015 3022 +7 ========================================== - Hits 16993 16992 -1 - Misses 2785 2791 +6

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Footer

© 2026 GitHub, Inc.