Subtree of Another Tree
Subtree of Another Tree: Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values…
Subtree of Another Tree: Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values…
Same Tree: Given the roots of two binary trees p and q, write a function to check if they are the same or not.
Invert A Binary Tree: Given the root of a binary tree, invert the tree, and return its root.
Word Search: Given an m x n grid of characters board and a string word, return true if word exists in the grid.
Diameter of Binary Tree: Given the root of a binary tree, return the length of the diameter of the tree.
Path Sum: Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along…