-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fixed issue #88 #89
Fixed issue #88 #89
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
==========================================
- Coverage 89.73% 89.71% -0.02%
==========================================
Files 142 142
Lines 6604 6651 +47
Branches 846 849 +3
==========================================
+ Hits 5926 5967 +41
- Misses 288 289 +1
- Partials 390 395 +5
|
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.
I have reviewed and tested all these changes, everything is working fine.
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.
Now erase
function is working properly. Thanks for noticing and fixing it, but I really think we can remove these code in erase
since the rest of the code can handle this situation as well.
if (root->val == key) {
root = root->next;
}
You are right about this. |
Bug in search method
This was caused by searching till tail but now it's fixed to search until nullptr and eventually checking in the end
Bug in push_front method
Now here, tail must be equal to the new pointer if it doesn't exist.
Bug in erase method
Can't see anything wrong with the function after the changes on search and push_front, i believe everything is good now regarding the 3 bugs you found.
#88 is now ready, issue holder might review as well.