emilydolson / emilydolson/python-red-black-trees

Usage as a backend for a SET-like datastructure

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I want to use your implementation for my data structure.
In particular set would behave like this:
```
s = set()
s.add(1)
s.add(2)

# Logarithmic search
one_present = 1 in s

# Only one 2 is present
s.add(2)
```

As you might notice, in this case, the insertion of an already existing Node would just override the existing one, not insert it somewhere else.
Do you think this is a useful addition and should I create a PR with that patch, or you're fine with the current implementation?

Cheers!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.