Data Structures

Data structure  is an efficient way of organizing data for storage and access by an algorithm where as an algorithm a step by step procedure for performing some task in a finite amount of time. Algorithms and data structures are closely linked to each other.

Continue reading


Queue ADT Implementation

The Queue ADT stores arbitrary objects and insertions and deletions of this ADT follow the first-in-first-out (FIFO) scheme i.e. insertions are at the rear of the queue and removals are from the front of the queue. As in a line or queue at a ticket stand, items are removed from the data structure in the same order that they are added.

Continue reading


Recursive Algorithm: Towers of Hanoi

The classic problem of the Towers of Hanoi is a mathematical game or puzzle, where you have 3 towers and N disks of different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of size from top to bottom, the smallest at the top, thus making a conical shape. 

Continue reading