-
-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
Added doctest & docstring to quadratic_probing.py #10996
Conversation
reference: | ||
- https://en.wikipedia.org/wiki/Quadratic_probing |
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.
Let's put the URL above the tests so visitors can look at the tests and implementation without any visual clutter.
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.
@cclauss I made the changes as mentioned by you
>>> qp.insert_data(111) | ||
>>> qp.keys() | ||
{0: 0, 7: 999, 3: 111} | ||
""" |
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.
""" | |
3. Try to add three data elements when only two were provisioned | |
>>> qp = QuadraticProbing(2) | |
>>> qp.insert_data(0) | |
>>> qp.insert_data(999) | |
>>> qp.insert_data(111) | |
??? | |
""" |
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.
@cclauss Done
* Added doctest & docstring to quadratic_probing.py * Update quadratic_probing.py * Update quadratic_probing.py
Describe your change:
Contributes to #9943
Checklist: