Startet på 101

This commit is contained in:
Håkon Størdal 2025-03-22 14:31:00 +01:00
parent a78fac5f21
commit d7d4601456
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,33 @@
// Definition for a binary tree node.
#[derive(Debug, PartialEq, Eq)]
pub struct TreeNode {
pub val: i32,
pub left: Option<Rc<RefCell<TreeNode>>>,
pub right: Option<Rc<RefCell<TreeNode>>>,
}
impl TreeNode {
#[inline]
pub fn new(val: i32) -> Self {
TreeNode {
val,
left: None,
right: None
}
}
}
struct Solution{}
use std::rc::Rc;
use std::cell::RefCell;
impl Solution {
pub fn is_symmetric(root: Option<Rc<RefCell<TreeNode>>>) -> bool {
}
}
fn main() {
println!("Hello, world!");
}