Crates.io | treers |
lib.rs | treers |
version | 0.1.2 |
source | src |
created_at | 2020-08-25 20:44:23.125122 |
updated_at | 2020-10-01 12:20:32.311612 |
description | Simple implementation of Sedgewick's tree maps |
homepage | |
repository | https://github.com/Horki/treers |
max_upload_size | |
id | 280716 |
size | 80,442 |
This is a hobby project, simple rewrite of Sedgewick's tree structures in Rust.
Please contribute, feel free to write an issue, there are still plenty things to improve (such as improvement of docs).
Name | Description |
---|---|
new | New Instance of Tree Map |
size | Count of items in map |
get | Fetch an value in map by key |
put | Insert by key-value |
height | Tree Height |
is_empty | Checks if map is empty |
contains | Returns true if item exists |
min | Retrieve a minimum key in map |
max | Retrieve a maximum key in map |
delete | TODO |
Name | Description |
---|---|
pre_order | Pre Order Traversal; DFS |
in_order | In Order Traversal; DFS |
post_order | Post Order Traversal; DFS |
level_order | Level Order Traversal; BFS |
Algorithm | Average | Worst Case |
---|---|---|
Space | O(n) | O(n) |
Search | O(log n) | O(n) |
Insert | O(log n) | O(n) |
Algorithm | Average | Worst Case |
---|---|---|
Space | O(n) | O(n) |
Search | O(log n) | O(log n) |
Insert | O(log n) | O(log n) |
Algorithm | Average | Worst Case |
---|---|---|
Space | O(n) | O(n) |
Search | O(log n) | O(log n) |
Insert | O(log n) | O(log n) |
Licensed under the MIT License.