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

## c++ initialize vector of vectors with 0 (zeros)

In this post, i will show you how to initialize c++ stl vector of vectors and fill them…

## monotonic array examples

A monotonic array is an array whose elements are entirely increasing or entirely decreasing but may include elements…

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