Readable code, function docstring and doctests#10888
Readable code, function docstring and doctests#10888Hardvan wants to merge 14 commits intoTheAlgorithms:masterfrom
Conversation
cclauss
left a comment
There was a problem hiding this comment.
This is checked on the commit message but these changes do NOT comply.
Please avoid changing both code and tests in a single pull request.
|
I have removed the added doctests. Now, there is only one change - the code. |
|
Great. Please open another pull request with the doctests and we can merge that one before this one. |
|
I have opened the PR #10891 which has the added doctests. Thanks! |
|
OK. Please add the tests that have been merged to |
|
Added the tests that have been merged to master. |
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
for more information, see https://pre-commit.ci
… into fractional-knapsack
|
Renamed the variables. |
05d92c0 to
aa93e55
Compare
for more information, see https://pre-commit.ci
|
I'll add the changes tomorrow. Thanks for highlighting the issues. |
|
I have added the input validation check for |
|
I have corrected the algorithm. |
Improved code readability by using separate if-elif statements for conditional checks.
Added inline comments to describe the procedure steps.
Enhanced function documentation for clarity.
Incorporated additional function doctests for thorough testing.
Added Wikipedia reference link for the Fractional Knapsack algorithm.
Checklist: