You are given a non-empty binary tree, you need to return the maximum path sum. A path, in this problem, is defined as a sequence

# Category: Trees

## Is given Tree a BST or not?

You are given a binary tree, you need to determine if the tree is a valid BST or not? For a tree to be a

## Least Common Ancestor

You are given a Binary Tree and two nodes N1 and N2, you need to return the least common ancestor of N1 and N2. The

## Diameter of a Binary Tree

The diameter or width of a tree is the count of nodes in the longest path from one leaf to another. Given a binary tree,

## Print all paths from Root to leaf.

You are given a binary tree, you need to print all the paths from root to leaf nodes. In the above figure, the paths from

## Right View of a Binary Tree

You are given a Binary Tree, you need to print the right view of the tree. Consider the tree in the below figure. The right