From d7d4601456386d197764c24478acc44ea757a0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20St=C3=B8rdal?= <30749741+hakon55@users.noreply.github.com> Date: Sat, 22 Mar 2025 14:31:00 +0100 Subject: [PATCH] =?UTF-8?q?Startet=20p=C3=A5=20101?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- symmetric-tree-101/Cargo.toml | 6 ++++++ symmetric-tree-101/src/main.rs | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 symmetric-tree-101/Cargo.toml create mode 100644 symmetric-tree-101/src/main.rs diff --git a/symmetric-tree-101/Cargo.toml b/symmetric-tree-101/Cargo.toml new file mode 100644 index 0000000..463033c --- /dev/null +++ b/symmetric-tree-101/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "symmetric-tree-101" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/symmetric-tree-101/src/main.rs b/symmetric-tree-101/src/main.rs new file mode 100644 index 0000000..078ce90 --- /dev/null +++ b/symmetric-tree-101/src/main.rs @@ -0,0 +1,33 @@ +// Definition for a binary tree node. + #[derive(Debug, PartialEq, Eq)] + pub struct TreeNode { + pub val: i32, + pub left: Option>>, + pub right: Option>>, + } + + 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>>) -> bool { + + } +} + +fn main() { + println!("Hello, world!"); +}