Struct leetcode_prelude::TreeNode
source · pub struct TreeNode {
pub val: i32,
pub left: Option<Rc<RefCell<TreeNode>>>,
pub right: Option<Rc<RefCell<TreeNode>>>,
}
Expand description
Definition for a binary tree node.
Note
I add Ord PartialOrd for sort Vec
Fields§
§val: i32
§left: Option<Rc<RefCell<TreeNode>>>
§right: Option<Rc<RefCell<TreeNode>>>
Implementations§
Trait Implementations§
source§impl Ord for TreeNode
impl Ord for TreeNode
source§impl PartialOrd<TreeNode> for TreeNode
impl PartialOrd<TreeNode> for TreeNode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more