Skip to content

Add strand sort#1024

Open
anaslimem wants to merge 4 commits intoTheAlgorithms:masterfrom
anaslimem:add-strand-sort
Open

Add strand sort#1024
anaslimem wants to merge 4 commits intoTheAlgorithms:masterfrom
anaslimem:add-strand-sort

Conversation

@anaslimem
Copy link

Pull Request Template

Description

Added the Strand Sort algorithm to the sorting module. Strand sort is a recursive/iterative sorting algorithm that sorts items of a list into increasing order. It works by repeatedly pulling sorted sublists out of the list and merging them with a sorted result list. The implementation provided ensures $O(N)$ best-case time complexity, where elements are already sorted or reverse-sorted, and $O(N^2)$ worst-case time complexity.

References:

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked CONTRIBUTING.md and my code follows its guidelines.

@anaslimem anaslimem requested a review from imp2002 as a code owner March 6, 2026 19:18
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.04%. Comparing base (a84b940) to head (553479e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1024      +/-   ##
==========================================
+ Coverage   96.02%   96.04%   +0.01%     
==========================================
  Files         386      387       +1     
  Lines       29011    29086      +75     
==========================================
+ Hits        27858    27935      +77     
+ Misses       1153     1151       -2     

☔ 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.

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