Introduction
Most of the image editing software like Microsoft paint, Paint.NET, Adobe Photoshop offer features like paint fill. This post is an attempt to define a simple version of the algorithm which is used to implement paint fill. The problem definition goes like this:
There is a grid with dimensions N*M such that each cell of the grid is colored. The paint fill technique allows a user to choose a color to be filled, say K and a cell C(i,j).
If the cell C(i,j) has the same color as K, then do nothing.
If the cell C(i,j) has a color L which is different from K then find all the...

Read More
# recursion

## Data Structures and Algorithms – Recursion

Introduction
The article Data Structures and Algorithms – Recursion is the third in series, of online course for Data Structure Algorithm. This is an effort to introduce and explain the Recursion methodology of algorithm design and programming. We will try to write some recursion based code and analyze the complexity of the algorithms in detail.
Recursion
It is the concept of defining a method that makes a call to itself and the call is termed as a recursive call. This is a readable and still efficient way of designing algorithms in the scenario where the problem in hand can be redefined by...

Read More