Skip to content

Comments

Add van Emde Boas tree implementation and tests#2722

Open
mitchricker wants to merge 4 commits intokeon:mainfrom
mitchricker:veb_tree
Open

Add van Emde Boas tree implementation and tests#2722
mitchricker wants to merge 4 commits intokeon:mainfrom
mitchricker:veb_tree

Conversation

@mitchricker
Copy link

This PR adds a Van Emde Boas tree (priority queue) implementation to the repository.

New module: algorithms/data_structures/veb_tree.py

Features:

  • insert, delete, successor, member operations (O(log log u))
  • min and max queries (O(1))
  • Space complexity: O(u), where u = universe size

Includes unit tests in tests/test_veb_tree.py

  • Tests cover insertion, deletion, successor queries, min/max, and invalid inputs
  • Passes all tests and integrates with the existing test suite

Improve documentation by adding docstrings to more closely align with other code in the project. Modified module docstring for succinctness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants