Module shortcuts

Source
Expand description

Wraps a value in TreeNode all in one function, of any scale.

Functionsยง

new_cell
Create a RefCell<TreeNode> with given value.
new_node
Create a complete node(Option<Rc<RefCell<TreeNode>>>) with given value.
new_rc
Create a Rc<RefCell<TreeNode>> with given value.
to_ptr
Convert the rust style mutable pointer(specified in leetcode) into C/C++ style immutable pointer.
to_ptr_mut
Convert the rust style mutable pointer(specified in leetcode) into C/C++ style mutable pointer.
val
Access the value pointed by the given pointer.