-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
double_linear_search algorithm #2161
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
Hey @reinhold-b, TravisCI finished with status TravisBuddy Request Identifier: 8ad70730-bc68-11ea-937a-75d40a178b7c |
Hey @reinhold-b, TravisCI finished with status TravisBuddy Request Identifier: b5a678d0-bc6b-11ea-937a-75d40a178b7c |
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.
removed whitespace in blank lines
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.
added blank after >>>
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.
There's no need of examples in the main code, all examples should be in the doctests
For me, I see no reason why we should limit the main code from having examples. |
searches/double_linear_search.py
Outdated
"""Implementation of a double-linear-search, | ||
which iterates through the array from both sides: start and end. | ||
|
||
Change ARRAY_LENGTH to a number you want to generate an example array, |
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.
Lines 4 - 10 should be moved into __main__
because they are not used by your function.
Hey @reinhold-b, TravisCI finished with status TravisBuddy Request Identifier: 539b6040-bd26-11ea-ab91-9125a069a76b |
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.
Nice work!!
* linear search iterating from both array sides * Update double_linear_search.py * Update double_linear_search.py * added doctests * updated doctests * Update double_linear_search.py * Update double_linear_search.py * added blank after >>> * made all the requested changes * Update double_linear_search.py * Update double_linear_search.py Co-authored-by: Christian Clauss <cclauss@me.com>
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.