Check Same Binary Tree

Check Same Binary Tree

Question :   Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are...
Average Of Leveles In Binary Tree

Average of Levels in Binary Tree

Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.Example 1:Note:The range...
Convert BST to Greater Tree

Convert BST to Greater Tree

Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the...
Symmetric Tree

Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric:But...
Invert Binary Tree

Invert Binary Tree

Invert a binary tree.toTrivia: This problem was inspired by this original tweet by Max Howell: Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t...
Merge Two Binary Tree

Merge Two Binary Trees

Question :Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees...
Binary Tree Path Sum III

Binary Tree Path Sum III

You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The...
Binary Tree Path Sum II

Binary Tree Path Sum II

Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example: Given the below binary tree...
Binary Tree Path Sum

Binary Tree Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the...
Minimum Depth of Binary Tree

Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down...