Skip to content

Conversation

@actuallyatiger
Copy link
Contributor

Pull Request Template

Description

Fixes #879
Updates the out-of-bounds check to include length = index and also adjusts the bound on the call to delete_tail so that it can actually be used.

Also added a test case for when length = index

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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 checked COUNTRIBUTING.md and my code follows its guidelines.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.51%. Comparing base (a45a382) to head (1f885db).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #880      +/-   ##
==========================================
+ Coverage   95.50%   95.51%   +0.01%     
==========================================
  Files         317      317              
  Lines       22948    22955       +7     
==========================================
+ Hits        21916    21925       +9     
+ Misses       1032     1030       -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.

@vil02 vil02 merged commit 1dbf1a0 into TheAlgorithms:master May 19, 2025
4 checks passed
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.

linked_list.delete_ith: out-of-bounds check and tail-deletion condition are incorrect

3 participants