mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 05:53:07 +08:00
* fix: correct treap split() to match docstring for equal values (#7854) The split() function in treap.py uses `<` comparison but the docstring states that the right subtree should contain values "greater or equal" to the split value. This fix changes `elif value < root.value:` to `elif value <= root.value:` so that equal values go to the right subtree as documented. Fixes #7854 * Fix typo in Treap node docstringfix: remove accidental typo in Node class docstring * Fix erase logic in treap.py Adjust split logic to include the value in the right subtree. --------- Co-authored-by: Christian Clauss <cclauss@me.com>