Skip to content

Improve clear() method #3

Description

@spinrut

Method is currently not tail recursive; results in excessive use of stack space.

Idea for improved algorithm:

  1. Perform left rotations about root until root has no left children.
  2. Replace root with its right child.
  3. Repeat until root is None.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions