Skip to content

BinarySearchTreeNode removing #2102

@bbonch

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();
});

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