## Solving Water Jug Problem using BFS

Introduction Water Jug Problem is also known as Water Pouring Puzzles, measuring puzzles and decanting problems. These belong to a class of puzzles, in which there are a finite and specific number of water jugs having predefined integral capacities, in ...

## How Immutable Data Structures is Optimised?

Introduction According to Wikipedia, in computing, a persistent data structure is a data structure that always preserves the previous version of itself when it is modified. Such data structures are effectively immutable, as their operations do not (visibly) update the ...

## Directed Graph or Strongly Connected Components

A directed Graph is said to be strongly connected if there is a path between all pairs of vertices in some subset of vertices of the graph. In simple words, it is based on the idea that if one vertex ...

## Graph Traversal Techniques in DFS & BFS

People always try to find out a way to keep the order of their things. And to achieve this they keep on playing with different data structures until they find the best one. In this blog, we will be talking ...

## Implementing DFS using Adjacency Matrix

Depth-first search (DFS) is popularly known to be an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the basis node (selecting some arbitrary node because the root node within the case of a graph) ...

## DFS using Adjacency Matrix

Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far ...