Given an array or a string, print all the permutations of it. A permutation of a string, is a rearrangement of the elements of the

# Tag: recursion

## Maximum Path Sum

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

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

## Arrival and Departure time.

You are given a directed graph. You need to find the arrival and departure time of all the vertices in the graph. Arrival time is