## trapping rain water explanation

Problem Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water…

## Height balanced binary tree

A binary tree is height balanced if for each node in the tree, the difference between the height…

## Find longest path in binary tree

Problem Write a function that takes in a binary tree and returns its diameter. The diameter of a…

## binary search tree construction

In this tutorial, i am going to show you examples of how to construct a binary search tree…

## dijkstra algorithm using min priority queue

In this tutorial, i will show you how to write dijkstra algorithm for solving shortest path problem between…

## Coin change problem all combinations in javascript

In this solution, we will be exploring the option of going through all combination to count the number…

## minimum coin change problem with recursion and memoization in javascript

The Problem is to find the minimum number of coins required for constructing a sum. This is a…

## n queens problem algorithm pseudocode

The n queens problem is a typical recursion and bactracking problem and you need a clear understanding of…

## c++ next permutation vector

The simplest way to generate the permutation of a vector in c++ without having to write the permutation…

## Permutation algorithm in c++

In this tutorial, i am going to show you a simple permutation algorithm in c++ using recursion, backtracking…