Optimized recursive_bubble_sort (#2410)
* optimized recursive_bubble_sort
* Fixed doctest error due whitespace
* reduce loop times for optimization
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -28,11 +28,11 @@ class RedBlackTree:
|
||||
right: Optional["RedBlackTree"] = None,
|
||||
) -> None:
|
||||
"""Initialize a new Red-Black Tree node with the given values:
|
||||
label: The value associated with this node
|
||||
color: 0 if black, 1 if red
|
||||
parent: The parent to this node
|
||||
left: This node's left child
|
||||
right: This node's right child
|
||||
label: The value associated with this node
|
||||
color: 0 if black, 1 if red
|
||||
parent: The parent to this node
|
||||
left: This node's left child
|
||||
right: This node's right child
|
||||
"""
|
||||
self.label = label
|
||||
self.parent = parent
|
||||
|
||||
Reference in New Issue
Block a user