-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Add TortoiseHareAlgo implementation with append, toString, and getMiddle methods #6722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implement TortoiseHareAlgo with append, getMiddle, and toString methods - Added generic singly linked list with inner Node class - Implemented append() to add elements - Implemented getMiddle() using Tortoise-Hare approach - Added toString() for readable list representation
Add JUnit tests for TortoiseHareAlgo - Verified append() and toString() output - Tested getMiddle() for odd, even, and empty lists - Ensured correct behavior and null handling
Add TortoiseHareAlgo to linked list documentation - Added TortoiseHareAlgo.java to file descriptions - Described its purpose: finding middle element using Tortoise-Hare algorithm
Fixed build error
Fixed line formatting build error
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6722 +/- ##
============================================
+ Coverage 77.39% 77.43% +0.03%
- Complexity 6240 6250 +10
============================================
Files 723 724 +1
Lines 20839 20873 +34
Branches 4064 4069 +5
============================================
+ Hits 16129 16162 +33
Misses 4076 4076
- Partials 634 635 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed line formatting build error
Added {} after if statement instead of directly writing statement
Fixed line formatting build error
Added {} after if statement instead of directly writing statement
Replace .* import with specific imports
@TejasSingh022 Please fix the failing workflows so I can start the review. |
The build is failing due to a test file (BloomFilterTest) that I didn’t modify. My code file functions correctly and doesn’t cause this error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake. Thank you @TejasSingh022
clang-format -i --style=file path/to/your/file.java
Description
Added TortoiseHareAlgo.java and its test.
Updated LinkedList documentation to include it.