## Least cost path in given digraph from given source to destination having exactly m edges

Given a weighted digraph (Directed Graph), find the least cost path from given source to destination that have exactly m edges.

## Find maximum cost path in graph from given source to destination

Given a weighted graph, find the maximum cost path from given source to destination that is greater than a given integer x. The path should not contain any cycles.

## Traverse the given directory using BFS and DFS in Java

In this post, we will see how to traverse the given directory and list out all files present in it and all its sub-directories.

## Least Cost Path in Weighted Digraph using BFS

Consider a directed graph where weight of its edges can be one of x, 2x or 3x (x is a given integer), compute the least cost path from source to destination efficiently.

## Find shortest distance of every cell from landmine in a Maze

Given a Maze in the form of a rectangular matrix, filled with either O, X or M, where O represents an open cell, X represents a blocked cell and M represents landmines in the maze, we need to find shortest distance of every open cell in the maze from its nearest mine.

## Check if given binary tree is complete binary tree or not

Given a binary tree, check if it is a complete binary tree or not.

## Level Order Traversal of Binary Tree

Given a binary tree, print its nodes level by level. i.e. all nodes present at level 1 should be printed first followed by nodes of level 2 and so on.. All nodes for any level should be printed from left to right.

## Find Shortest path from source to destination in a matrix that satisfies given constraints

Given a N x N matrix of positive integers, find shortest path from the first cell of the matrix to its last cell that satisfies given constraints.

## Count the number of islands

Given a binary matrix where 0 represents water and 1 represents land, count the number of islands in it. A island is formed by connected one’s.   For example, consider below image.    Above image highlights water in blue and land in grey in a 10 x 10 matrix. There are total five islands present in the above …

## Flood Fill Algorithm

Flood fill (also known as seed fill) is an algorithm that determines the area connected to a given node in a multi-dimensional array.

## Find shortest safe route in a field with sensors present

Given a rectangular field with few sensors present on it, cross it by taking the shortest safe route without activating the sensors.   The rectangular field is given in the form of M x N matrix and we need to find the shortest path from any cell in first column to any cell in the …

## Shortest path in a Maze | Lee algorithm

Given a maze in the form of the binary rectangular matrix, find length of the shortest path in a maze from given source to given destination.