Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/douchuan/algorithm
/ Tree
Class
Tree
src/tree/binary/tree.rs:4–7 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
2
use std::ptr::NonNull;
3
4
pub struct Tree<K, V> {
5
pub root: Option<NonNull<Node<K, V>>>,
6
size: usize,
7
}
8
9
impl<K, V> Tree<K, V> {
10
pub fn height(&self) -> usize {
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected