category-wise-problems

contains category wise problems(data structures, competitive) of popular platforms.

View the Project on GitHub mayankdutta/category-wise-problems

100. Same Tree, Easy

implementation ```cpp class Solution { public: bool isSameTree(TreeNode* p, TreeNode* q) { if (p == nullptr and q == nullptr) return true; if (p == nullptr or q == nullptr) return false; return (p -> val == q -> val) && isSameTree(p -> left, q -> left) && isSameTree(p -> right, q -> right); } }; ```