/LeetCodeQuestions

Solve LeetCode some questions in 3 language(1-dotnetcore 2-Golang 3-Rust)

Primary LanguageC#

LeetCodeQuestions

Solve LeetCode some questions in 3 language(1-dotnetcore 2-Golang 3-Rust)

1- Binary Tree Inorder Traversal : Given the root of a binary tree, return the inorder traversal of its nodes' values.

2- Unique Binary Search Trees : Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n.

3- Validate Binary Search Tree :

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

A valid BST is defined as follows:

The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's key.
Both the left and right subtrees must also be binary search trees.

4- Same Tree : Given the roots of two binary trees p and q, write a function to check if they are the same or not.

Two binary trees are considered the same if they are structurally identical, and the nodes have the same value.

5- Symmetric Tree: Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).