Skip to content

Commit

Permalink
Merge pull request #6 from rkechols/tree-map
Browse files Browse the repository at this point in the history
Implement TreeMap
  • Loading branch information
rkechols committed May 13, 2022
2 parents 104815c + a0f6071 commit d0894b0
Show file tree
Hide file tree
Showing 6 changed files with 767 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ Comprehensive package of Python-native datastructures.


### Planned Datastructures:
- tree set (AVL)
- tree map (AVL)
- ordered list (?) = binary tree (AVL) with duplicates (counts)
- tree set
- ordered list (?) = binary tree with duplicates (counts)
- trie
- disjoint set (forest)
- graph (weighted or not, directed or not, sparse or not)


### Implemented Datastructures:
- Heap (AKA priority queue)
- TreeMap


### Will Not Implement:
- fixed-size array
- dynamic array (use `list`)
- linked list (use `collections.deque`)
- stack (use `collections.deque`)
- stack (use `collections.deque` or `list`)
- queue (use `collections.deque`)
- deque (use `collections.deque`)
- hash set (use `set`)
Expand Down
1 change: 1 addition & 0 deletions ech_datastructures/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .heap import Heap
from .tree_map import TreeMap
2 changes: 1 addition & 1 deletion ech_datastructures/heap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import heapq
from typing import Any, Callable, Generic, Iterable, TypeVar, List
from typing import Any, Callable, Generic, Iterable, List, TypeVar


T = TypeVar("T")
Expand Down
Loading

0 comments on commit d0894b0

Please sign in to comment.