Skip to content

Conversation

@koushik-sai
Copy link

This PR adds an enhancement to the linked list data structures by:

  • Implementing an algorithm to find the middle node of a singly linked list using the slow and fast pointer technique
  • Documenting behavior for even-length lists (returns second middle)
  • Adding unit tests covering empty, single-node, odd-length, and even-length lists

Fixes #6617

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.92%. Comparing base (d9f2ac8) to head (0f197fa).

Files with missing lines Patch % Lines
...structures/lists/FindMiddleOfSinglyLinkedList.java 92.30% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7166      +/-   ##
============================================
+ Coverage     78.90%   78.92%   +0.01%     
- Complexity     6853     6858       +5     
============================================
  Files           769      770       +1     
  Lines         22668    22681      +13     
  Branches       4456     4457       +1     
============================================
+ Hits          17887    17900      +13     
- Misses         4067     4068       +1     
+ Partials        714      713       -1     

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

@koushik-sai
Copy link
Author

Thanks for reviewing this! 🙌
After further inspection, I noticed that the middle-finding logic already exists in SinglyLinkedList and is already covered by unit tests. Since this enhancement is already addressed, I’m closing the PR to avoid duplication.

@koushik-sai koushik-sai deleted the add-find-middle-singly-linked-list branch December 15, 2025 10:51
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