Skip to content

BinarySearchTreeNode removing #2102

Description

@bbonch

Have found an issue in the remove method
Run this test to reproduce

it.only('should remove nodes', () => {
const root = new BinarySearchTreeNode(8);
root.insert(3);
root.insert(6);
root.remove(3);
root.remove(6);
expect(root.right).toBeNull();
expect(root.left).toBeNull();
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions