Uh oh!
There was an error while loading. Please reload this page.
Create number container system algorithm - #8808
Conversation
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
Uh oh!
There was an error while loading. Please reload this page.
…aedenph/python into create-number-container-system
cclauss
left a comment
There was a problem hiding this comment.
This looks cool!!
How does it perform on long lists of numbers?
from random import shuffle
numbers = list(range(10_000))
shuffle(numbers)
binary_search_delete(numbers, 5_000)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
9bf70fe to
82e1a0bCompareCaedenPH
commented
Jun 8, 2023
Good idea, I can add some timeit methods to show the scalability of this algorithm. Note that binary search requires a sorted array so shuffle cannot be used |
CaedenPH
commented
Jun 8, 2023
@cclauss I have added more tests to both insert and delete functions along with allowing not only list of ints but also strings and range objects. |
Describe your change:
Implements a number container system algorithm which stores indexes and numbers at these corresponding indexes.
Checklist:
Fixes: #{$ISSUE_NO}.