Sunday, October 17, 2021
More
Home Tags Leetcode Solution

# Leetcode Solution

### Merge Two Binary Trees

In this article, we learn how to Merge Two Binary Trees with example and two different approaches. First approach is In Java using recursion (By creating...

### 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...

### 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...

### 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

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

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

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...

### Maximum Depth of Binary Tree

Question : Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node...

### Binary Tree Level Order Traversal

Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree , ...